c# programming

20050520

Multiple Website Development on Windows XP Pro

Did you know that you can develop multiple websites on Windows 2000 Professional and Windows XP Pro? Windows 2000 and Windows XP Professional have removed the menu to create multiple websites in Internet Information Services. But using a command-line interface you can still create multiple websites. Though you are only able to have one running at a time.

To do this...

  1. Type in a cmd.exe console "CScript.exe C:\Inetpub\AdminScripts\adsutil.vbs ENUM /P W3SVC" to find the highest number of your existing websites. Should be "1".
  2. Next you will copy an existing website to a new website by typing: "Cscript.exe C:\Inetpub\AdminScripts\adsutil.vbs COPY W3SVC/1 W3SVC/2" where 2 is the next number of the website.

You can also change the loopback IP addresses in the "%windir%\system32\drivers\etc\hosts" file. 127.0.0.x are called loopback IPs and will return to your local computer. This way you can access your web site by an ip address or by a domain name.

20050517

Microsoft Virtual PC 2004

I do a lot of my testing, and some of my development on Virtual PCs. I used to use VMWare, but now I use Microsoft's Virtual PC 2004. The change is due to the cost of the product. I originally used VMWare because they had a student edition for $99. They increased the price a couple years ago, and I managed to get a free copy of Microsoft's Virtual PC about the same time. I think they are both good products. I have heard that VMWare is slightly faster than Virtual PC. But I don't need the fastest product, I happier with a good product, that is cheaper.

A few tips on using Virtual PC...

  1. Use a seperate virtual disk to host the page file.
  2. Defragment your hard drive using this program from this site. You only need the Defrag.exe file on your Virtual PC. Then you can run the defragmenter using this command line "defrag -d c:", where c is the drive to be defragmented.
  3. Pre-Compact the hard drive using the Virtual Disk Pre-Compactor that is included in Virtual PC Service Pack 1
  4. Run the "Virtual Disk Wizard" and Compact the hard drive.