Scott Forsyth's Blog

Postings on IIS, ASP.NET, SQL Server, Webfarms and general system admin.

.

  • Scott Forsyth

Hosting Needs

Training and Dev Labs

November 2011 - Posts

Change Password vs. Reset Password-Week 42

You can find this week’s video here.

The differences between change password and reset password are not well known. This week's video walks through the differences and shows them in action. Tune in to find out more about password management.

It wasn’t until fairly recently that I realized that there is a difference between a change password and a reset password. One is safe, while the other not so much. I remember when Windows Server 2003 was first released and resetting a user’s password had a distinct warning about irreversible loss of information. I wondered why it wasn’t mentioned in previous operating systems, but I also wondered if it was true since I never personally noticed any impact.

It wasn’t until about a year ago when I really dug in to understand this topic better. This week’s lesson covers the differences between a change password and a reset password. In this video we also take a look at it in action so that we have a solid understanding of the topic, and briefly discuss how it works for programming APIs too.

This is now week 42 of a 52 week series for the web pro. You can view past and future weeks here: http://dotnetslackers.com/projects/LearnIIS7/

You can find this week’s video here.

URL Rewrite city.domain.com to domain.com/city

An IIS 7.x URL Rewrite question that comes up often is how to redirect something.domain.com to domain.com/city.

Here’s an example URL Rewrite rule to accomplish that:

<rule name="CName to URL" stopProcessing="true">
    <match url=".*" />
    <conditions>
        <add input="{HTTP_HOST}" pattern="^(?!www)(.*)\.domain\.com$" />
    </conditions>
    <action type="Redirect" url="http://domain.com/{C:1}/{R:0}" />
</rule> 

This will redirect http://anything_except_www.domain.com to http://domain.com/anything_except_www.

It will also maintain the URL and querystring, so http://subdomain.domain.com/aboutus?more=info will redirect to http://domain.com/subdomain/aboutus?more=info.

It’s also possible to do this with a rewrite rule instead so that the original URL is maintained while the server sees the rewritten path.  That rewrite rule will look like this:

<rule name="CName to URL - Rewrite" stopProcessing="true">
    <match url=".*" />
    <conditions>
        <add input="{HTTP_HOST}" pattern="^(?!www)(.*)\.domain\.com$" />
    </conditions>
    <action type="Rewrite" url="/{C:1}/{R:0}" />
</rule>   

Basically this rule will look like http://subdomain.domain.com/aboutus/ to the site visitor but it will really hit siteroot/subdomain/aboutus/ on the server.

Note that there are other considerations for rewrites which are covered in more depth here.

Posted: Nov 23 2011, 02:09 PM by OWScott | with 18 comment(s)
Filed under: , ,
Line Numbering in Notepad-Week 41

You can find this week’s video here.

Notepad is so simple, yet so useful. Yet, at times the "Go To" appears to break and doesn't work as expected. This week's video is short and sweet. Learn about line numbering in notepad.

One of my all-time favorite applications is notepad. You may think I’m joking, but I’ve grown quite fond of notepad over the years. Like a faithful friend, always there for you when you need it. Whether it’s an old computer or new, it opens instantly. I can’t remember notepad ever crashing. Wish I could say that for most other applications.

This week’s lesson is a quick one, but if you’ve ever run into issues with line numbering in notepad, I hope you find it useful. I remember the first time the “Go To” feature didn’t work in notepad for me. It took me a while to figure it out so I hope to save you the grief that I went through.

Watch this week’s video for a couple quick tips on the tried and true notepad.

This is now week 41 of a 52 week series for the web pro. You can view past and future weeks here: http://dotnetslackers.com/projects/LearnIIS7/

You can find this week’s video here.

Posted: Nov 21 2011, 10:28 AM by OWScott | with no comments
Filed under: ,
More Posts