Thursday, May 29, 2008

Error When Installing Commerce Server: The Default Web Site does not exist on this computer

The Error

I was doing a Commerce Server 2007 install today. Initially I was extremely pleased to find a very accessible evaluation/developer edition available (thanks MS). The install experience however quickly became less than pleasant.

The install itself went ok, but while I was running the Commerce Server Configuration Wizard I got this bizarre error:

The Default Web Site does not exist on this computer. This feature requires the default website to be present.


I of course hit up Google and found this one thread which suggested that Commerce Server merely polls IIS and looks for site with a Site Identifier of 1. The solution that was offered though was less than stellar though (uninstalling and then reinstalling IIS) so I decided to see if I couldn't improve upon it.

As it turns out all you need to do to get around this error is create a Web Site and make sure it has a Site Identifier of 1. We can do this by editing the IIS Metabase.xml. I've only tested this solution on my machine (running IIS 6 on Win2k3 Ent SP2). Proceed with some caution.

The Solution

These are the steps I took, you may have a slightly different approach, as far as I know you simply need a web site with an IIS Site Identifier of 1 for the config wizard to succeed.

  1. Create an IIS Web Site, name it Default Web Site if doesn't already exist.
  2. Open up the IIS Manager (Start->Run->Inetmgr) and click on Web Sites to see all the Identifiers for sites on your machine.2008.05.29 14.23.52
  3. Remember the Identifier (mine was 998577302) for the site you want to change to be the 'Default Web Site'. Now we're going to stop IIS (Start->Run->iisreset /stop).
  4. Navigate to C:\Windows\System32\Inetsrv and make a backup of your Metabase.xml. Seriously, backup this file. We're about to change it and you're going to want a backup if you mess it up.
  5. After you've made a backup open up the original in a text editor like NotePad. We're going to find the XML nodes that have the old site Identifier number (mine was 998577302) and replace that number with 1 (the new site identifier). This is apparently how the Commerce server decides if the given site is the "Default Web Site". Pretty arbitrary if you ask me but at least it's something that you can do something about.2008.05.29 14.25.46
  6. When this is done save the file and start up IIS again using the following command. (Start->Run->iisreset).
  7. Open up the IIS Manager again (Start->Run->inetmgr), click on Web Sites and notice that now the identifier for your site is 1. Run the Commerce Server Configuration wizard again and you should get a success message.Number1 success

Well that's it. Hope it helps someone.



Anonymous said...

Hey.... that post was a great help.... thanks for posting this...

digital signature PDF said...

You just made something that I thought was so difficult be, truly, so easy! Thanks for the post!