Testing websites locally on Vista

by Ted Jardine Wednesday, June 20, 2007 3:07 PM

Now that Vista is here with IIS 7, and can set up multiple websites, I have no more need of the IISAdmin tools I used with Windows XP, which hacked IIS 5 to allow more than one website (the limitation being only one website active at any given time).

I've got a pretty good system going.

1. I set up a website for a client project and assign a host header that resembles the client domain:


2. I open my hosts file (%WINDOWS%\system32\drivers\etc\hosts) and bind the new host header to the local server loopback address:     localhost-foo.clientsite.com

3. If I'm working with an ASP.NET website or web application (which is 99% of the time) I tell the Visual Studio 2005 project to use the IIS webserver at the just-defined host header when viewing and debugging:


It all makes for a realistic representation of how the application or website will behave on the client's domain, allowing me to be sure that various relative URLs are going to resolve, for instance. It is often the case that I am working with a predefined website hierarchy and template, so it's important to emulate the client's site as closely as possible, so that deployment is less of a hassle.

blog comments powered by Disqus

Month List