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:
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.
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.
- Create an IIS Web Site, name it Default Web Site if doesn't already exist.
- Open up the IIS Manager (Start->Run->Inetmgr) and click on Web Sites to see all the Identifiers for sites on your machine.
- 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).
- 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.
- 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.
- When this is done save the file and start up IIS again using the following command. (Start->Run->iisreset).
- 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.
Well that's it. Hope it helps someone.