IIS: Creating Multiple Web Sites within IIS on Windows 2000 and Windows XP Professional


Previous Topic Previous Next Topic Next
Xoc Software
Training
RVBA Conventions
Maya Calendar Program
Company Information
Tools
ASP.NET and Other Tips
.NET: Debugging Designer Features of a Custom Control in Visual Studio
.NET: Setting the Default Font in a Windows Mobile/Compact Framework Custom Control
.NET Fixing C# XML Comments so they Work in Windows XP SP2
.NET: Getting and Setting the Application Version Number
.NET: Getting the Path of the Executing Assembly
.NET: Retrieving Assembly Attributes
.NET: Setting the RootFolder to Other Values in the FolderBrowserDialog in .NET
.NET: Sizing Columns in a ListView Control in .NET
.NET: Using Remoting in .NET
ASP.NET: Constructing a Graphic on the Fly in ASP.NET
ASP.NET: Controlling Caching in ASP.NET Web Forms
ASP.NET: How to use the FrontPage Server Extensions with ASP.NET
ASP.NET: Seeing What is in the ViewState in ASP.NET Web Forms
ASP.NET: Using Forms Authentication in ASP.NET
ASP.NET: View Trace Information on your ASP.NET Web Pages
ASP: Create XML from an ADO query
ASP: Detect Incomplete Loads
ASP: Including an ASP.NET Web Page In a Classic ASP Web Page
ASP: Process .HTM Files with Scripts and Server Side Includes
ASP: QuickSort Algorithm
ASP: Retrieve all server variables from IIS
ASP: Send Email from Active Server Page
HTML: How to Create a Non-Scrolling Region in HTML
IE: Allowing Only Certain ActiveX Controls to Run in Internet Explorer
IIS: Creating a web site for testing in IIS Server
IIS: Creating Multiple Web Sites within IIS on Windows 2000 and Windows XP Professional
IIS: IIS/Visual InterDev Problems and Fixes
IIS: Redirect a domain such as xoc.net to www.xoc.net
SQL Server: Execute SQL Server Updategram
Web Design: Design for People with Disabilities
Web Design: Keep a Web Page out of the Google Cache
Windows: Get HTTP Header of a Web Page using Telnet
Windows: Testing Domain Names without DNS
Windows: Using Hosts File to Access Web Sites with XP SP2
Windows: Windows XP Command Line Tools
Windows Mobile: Reprogramming the Push-to-Talk Button on the AT&T Tilt
Articles
Miscellaneous
Downloads
Links
Search
Email

Other Xoc managed sites:
http://grr.xoc.net
http://www.986faq.com
http://www.mayainfo.org
https://mayacalendar.xoc.net
http://www.yachtslog.com

In the server versions of Windows, you can have multiple versions of web sites installed into IIS and running simultaneously. You can install and run more than one web site within IIS in the professional version of Windows XP or Windows 2000. You just have to pull a trick to modify the IIS metabase to that it is aware of the additional sites. The user interface does not support creating more than one web site. Also, you still will not be able to have more than one site running at the same time.

To create the second web site:

  • Create a command prompt window.
  • Type "cd \Inetpub\Adminscripts" and press enter.
  • Find out what the highest numbered site you currently have is. You can do that by typing
    adsutil.vbs ENUM /P W3SVC 
    
    If you have never done this process before, the highest numbered site should be 1.
  • Add one to the highest numbered site. Then run this command:
    adsutil.vbs COPY W3SVC/1 W3SVC/x
    
    Where x is replaced by the new numbered site. For example if you run the enum command and the highest numbered site is 4, then type this:
    adsutil.vbs COPY W3SVC/1 W3SVC/5
    
  • Run the IIS Manager. You should find a new site has been created. It will be an exact copy of site #1, so you will need to change a few things. Go into the properties for the web site. Change the site name, and the virtual directory for the root of the web site to point to another location on the hard disk. Usually, you will create a new subdirectory under Inetpub and point the virtual directory at that.
  • To use the site, you must first stop the currently running site, then start the new site.

To delete a site, first stop it if it is running (bad things happen if you don't!). Then type:

adsutil.vbs DELETE W3SVC/x

Where x is the number of the site you want to delete.

You can find the number for an existing web site in IIS Manager by enabling logging and examining the logging properties. The web site number is at the bottom of the dialog.

Extended Logging Properties dialog

Top