tags:

views:

866

answers:

8

At work, we have multiple branches that we may be working on at any time. Our solution so far as been to create multiple web-sites but you can only run one web-site at a time. This makes switching between branches more of a pain that in should be.

I just want to go to the URL, mapped in my hosts file, for that branch and it just work.

Our client machines are XP machines with IIS 5.1. Is there any way to make IIS 5.1 run more than one web-site simultaneously?

+1  A: 

I believe it is a restriction of IIS that you can only run more than one website on server versions of the windows OS.

Martin
Agreed - IIS-on-Windows-XP will only allow one website. Install the same version of IIS on Windows Server 2003, for example, and there wouldn't be this restriction.
Chris
+3  A: 

Yes, it is a restriction and this one website can have only 10 simultanious connections.

Buy a Windows 2003 or 2008 Small Business Edition, it is quite cost-effective in this scenario.

Biri
A: 

One way you could solve this without reinstalling your computer is to create each branch in a virtual subdirectory under you current web-root. Then at the top-level website, create a default.asp(x) the reads Request.ServerVariables["SERVER-NAME"] (should be underscore) and redirects the browser to whatever virtual directory/application you want to access. That way you can create all the "virtual" domains you want in your hosts file.

Espo
+2  A: 

Are virtual directories an option for you? I run multiple versions of the same website this way.

John Owen
A: 

With Windows XP and IIS 5.1 you cannot run moultiple web sites.

You can however run multiple ASP.NET hosts. You would probably have to write the host your self.

Something like this should get you started:

string FileLoction = "..Path to the branch..";
HttpListenerWrapper lw = (HttpListenerWrapper)ApplicationHost.CreateApplicationHost(
               typeof(HttpListenerWrapper), "/", FileLocation);

string[] prefixes = new string[] 
{
   "http://localhost:8081/",
   "http://127.0.0.1:8081/"
};

lw.Configure(prefixes, "/", FileLocation);
lw.Start();
John Hunter
A: 

Wiki Test answer, please ignore.

Espo
A: 

Picking up on Biri's answer rather than choose SBS there is a specific Windows Server Web edition which is the cheapest of all, around $399 and doesn't require CALs.

Otherwise, if it's just for developer machines Vista Ultimate allows multiple IIS sites hosted simultaneously.

blowdart
+1  A: 

Oddly enough, this is something I remember Jeff covering ages ago, but I guess it's still relevant if you're on IIS 5.1:

http://www.codinghorror.com/blog/archives/000329.html