My Setup
Operating System: Vista
Web Server: Microsoft IIS7 - Internet Information Services. This is the standard web server in the windows family.
Internet Connection: Connected to internet through a router.
Static IP address
Configure your PC so that when it connects to your router it will have a static IP address. Without a static IP address you may have to re-configure every time.
Here is a guide to setup Static IP address on Vista:
http://portforward.com/networking/static-vista.htmVirtual PC and XP Images
Download and install Microsoft Virtual PC 2007. At the time of writing the Microsoft Virtual PC download and information pages are at:
http://www.microsoft.com/windows/virtual-pc/Download and install a Virtual PC Image. E.g. IE6-XPSP3.exe contains a Windows XP SP3 with IE6 VHD file. At the time of writing the Internet Explorer Application Compatibility VPC Image download page is at:
http://www.microsoft.com/downloads/details.aspx?FamilyID=21eabb90-958f-4b64-b5f1-73d0a413c8ef&displaylang=enThere are Virtual PC Images for testing IE6,IE7,IE8
Virtual PC Networking
When you have installed your Virtual PC 2007 and your selected Virtual PC, you will need to setup networking. In the Virtual PC Console select the Virtual PC you want to run and click settings. Select Networking in the list on the left. You should see a list of connection options. Select the one that is the Networking Controller that your Host PC is using to connect to the router. E.G. in my case it is “NVIDIA nForce Networking Controller”. The other options I have are “Not Connected”, “Local only”, “Shared Networking (NAT)”. You do not want to select any of those.
At this point you should be able to browse the internet in the Virtual PC using Internet Explorer. You can test live websites from here.
Virtual PC hosts file
To see websites on you host PC'c webserver, you must set the host PC's IP address in the Virtual PC's hosts file for each website you want to test. The hosts file may be in this location: C:\WINDOWS\system32\drivers\etc
If not then you can use the windows search function to find it. Make sure that you tell it to search hidden folders.
Once you have found the hosts file you should make a shortcut to it and save it on the desktop of your Virtual PC. Then you can just add lines to the hosts file by opening it in Notepad.
E.g. My PC's static IP address is 192.168.1.8 so the line to add to the hosts file to see the website called localhost is:
192.168.1.8 localhost
Hopefully, now when you browse localhost on the Virtual PC you will now see the localhost website on the Host PC. You can setup all you development websites in the VPC hosts file so that you can test all your websites.