Change the Site Identifier in IIS
In IIS you'll notice that each website you create gets a site identifier automatically assigned a random number. If you're like me, you'd like those sites to have some semblance of order. Unfortunately IIS Manager does not allow you to rename sites but if you download and install the IIS Resource Kit on your workstation, you'll find the IIS Metabase Explorer can handle this.
You should first do a metabase backup just in case something goes wrong. Then launch the IIS Metabase Explorer from the resource kit. Once open, do the following to change the site identifier:
You should first do a metabase backup just in case something goes wrong. Then launch the IIS Metabase Explorer from the resource kit. Once open, do the following to change the site identifier:
- Connect to your webserver by clicking the Metabase > Connect... menu.
- Expand to the following key: LM > W3SVC and you will find your sites listed by the identifier number.
- To change the site identifier, right-click the number and select rename. You can verify the site by going into the Root subkey and finding the ServerComment. This matches the name within the IIS Manager.
- Once renamed you need to go into the renamed site's Root key and find the AppRoot name. That will still reflect the old site identifier in the form of:
LM\W3SVC\xxxxxxx\Root
- Change the numbers to reflect the new site ID number. Things like ASP require AppRoot so this must be done in order to preserve that functionality.