Tuesday, March 18, 2008

Multiple Web sites in IIS 5.1 for Windows XP

A big problem may face any web developer is to create more than a web site in the Internet Information Security (IIS), It appears Microsoft® has chosen to disable or disallow multiple Virtual IIS Servers in its offering of Win XP Pro. This functionality multi-site "take back" is very annoying. My understanding is Windows NT Server which I've worked with in the past allowed multiple IIS Virtual Servers ( web sites ).

What Microsoft did was strip the functionality out of the IIS GUI (Graphical User Interface), not the server itself. I should be able to right click on Web Sites and say "new" but cannot. Notice the GUI still says Web Sites, even though Microsoft eliminated the capability from the GUI! Many users of Win NT swear that you should be able to create multiple virtual web servers, but not on XP or 2000. Microsoft does mention this restriction on other web pages.

Just because you can't create the second or multiple virtual servers doesn't mean the GUI won't support them.

The Solution:

The scripting interface allows you to create the second site, but you can't start it unless the other (Default) site is stopped. The VBScript to have is \Inetpub\Adminscripts\adsutil.vbs. To create a stopped and un-configured site try "cscript.exe adsutil.vbs CREATE_VSERV W3SVC/2" in the command prompt.




This will create a new web site as the following image.


The new created web site is stopped by default and unfortunately here comes the silly part, all web sites cannot be running at the same time, to run a given web site you must stop all other web sites.

2 comments:

wabdelwahab said...

cool, this is better than changing the path of the default website, and makes it faster to run your website on ur local xp machine.

thanks for sharing it!

Anonymous said...

Also for help type this line in you command prompt "cscript.exe adsutil.vbs HELP".

enjoy :)