I have Visual Studio 2005 and 2008 Beta 2 installed on Vista Home Premium. I recently made a site that works fine in IE 7, Firefox, and Safari, but not in IE 6. It renders horribly. I can only guess that it's the broken box model, or something to do with floats. I need to test it, but how?
It isn't as simple as you might think. You can't install IE 6 and IE 7 side-by-side. You have to install Microsoft Virtual PC 2007, load an XP image with IE 6, and install the modified Cassini web server from ultiDev on Vista. Lets get to the details.
Download Stuff
First we need to download a lot of bits. Cassini and VPC 2007 are small, but the VPC image is pretty big. Dowload these files:
You'll have to wait a while for that first one, but after you get the files we'll move on to installing VPC.
Installing Virtual PC 2007 and Running the Image
Run the setup program, and take all the defaults. After it is installed, you'll have to run the IE6_VPC.EXE to extract the VPC Image. After it is extracted, you'll have a large .vhd file. This is the virtual hard drive that contains XP.
We have to create a new virtual machine, so run Virtual PC 2007. On the Console, click New. Choose "Create a Virtual Machine", name it, choose XP as the OS, and I reccomend bumping up the RAM to 512 MB if you can. Then, choose and existing hard disk, and navigate to the one you just extracted.
After you boot up the virtual machine, we'll enable the page file for better performance. Click Control Panel, System, Advanced, click Settings under Performance. Click Advanced, under Virtual Memory click Change. Select System Managed Size, click Set, then clik OK. Exit the System settings.
Now we have to turn off the proxy settings in IE. Open IE (it's IE 6!) and click Tools, Internet Options, Connections, LAN Settings. Uncheck "Use a Proxy Server for Your LAN".
So far, so good. You should be able to get to Google and other web sites now, but you'll have problems connecting to the built-in web server in Visual Studio. It's not designed to serve pages to other computers. That's why we need the Cassini Web Server. If you have Vista Ultimate or Business you could use IIS and skip installing the Cassini web server.
Installing and Configuring Cassini
Run the Cassini setup program, and choose all the defaults. After it is installed, run the Cassini Web Server Explorer. It will fire up a locally hosted web application. Click on Register to setup a new hosted application (the one you view on IE6). This screen can be somewhat annoying because it wipes out your file entry when you choose other options. Just navigate to the default.aspx file of your application after the other options are set.
First, either use a system assigned port or select a port. I chose port 80 so my ASP.NET app would be the default on the machine, but I don't think you have to. Click Generate to generate some settings, Set the Name, and navigate to the default.aspx page of your web app. I left the Description blank, but add one if you like. Click Save.
You should now be able to get to the web app from Vista. Your host OS, that is. Open a browser and type "localhost" in the address bar. If you didn't use port 80, and you used, say 65355 instead, type "localhost:65355" in the address bar. The site should open. If it didn't then something is wrong.
Connecting to Cassini from IE 6
In order for your Virtual PC to access Cassini on your host machine, you'll have to either disable the firewall in Vista, or create a rule to allow access. I just disabled it - both the Domain Profile, and the Private Profile to get it working.
Now you have to find out the IP address of your host OS, so open a command prompt and type "ipconfig". Your IP address should be listed after IPv4 address. Hopefully you are not using IPv6. It has some bugs (at least I had problems with it). Remember this address. Mine was 192.168.10.200.
Now back on the VPC. Open IE 6, and type the IP address of your host computer into the address bar. Again, if you specified a port other than 80, you'll have to type the IP address followed by a colon and the port. e.g. "192.168.10.200:65355". The site should open, and now you can debug it.
Conclusion
After some headaches, a lot of downloading, and configuration, you can now test on IE 6. For complete browser testing, I reccomending testing your site with IE 6, IE 7, the latest of Firefox, the latest of Opera, and the latest of Safari. Yes, a Safari 3 Beta is now available for Windows. Good luck. Maybe one day browser testing will be a little easier. We can only hope.
Update 10/12/2007
I found out that you can install IIS 7 on Vista Home Premium. It is limited, but it should work fine for development. If you install IIS, you won't have to install the Cassini web server. The one catch is that NT Authentication will not work out of the box, but there is
a fix.