Scott Forsyth's Blog

Postings on IIS, ASP.NET, SQL Server, Webfarms and general system admin.

Cloud Resources

IIS Resources

How to find the SiteID in IIS5 and IIS6

Occasionally I need to explain how to find the SiteID / Site Identifier in IIS5 and/or IIS6 so I thought I would quickly blog on how to do that so that I have a page that I can reference rather than typing it out each time.

When running various scripts or command line utilities, it is fairly common to need the Site ID of a site in IIS.  Fortunately it is quite easy to find.

IIS5: In IIS 5 or 6, view the properties of the website and in the Web Site tab, click on the Properties button for the logging. At the bottom of the Extended Logging Properties window is the Log file name. It will be something like this: W3SVC38\exyymmdd.log. The Site ID is 38 in this case.

propertybox 

IIS6: The IIS5 trick still works, but in addition you can click on the Web Sites major heading in the left hand side of the IIS admin tool and view the "Identifier" on the right hand side for whichever site you need. This is also the same Site ID.

Updated April 2010:

IIS7: IIS7 doesn’t have the FTP method anymore.  To find the site ID, first click on the Sites heading in IIS 7 Manager.  That will list all of the sites with the SiteID beside each site.

Comments

harisri7862k4u said:

hi, is this applicable to only web sites? I was getting the Log file name for web sites but for Web applications, this option was not available.

# June 7, 2011 5:12 PM

OWScott said:

Hi harisri7862k4u,

Yes, this only exists at the website level.  Subfolders and applications use the same site id as the website.  Logs are all together in the same file for the website itself.

# June 7, 2011 5:19 PM

sarbjit singh said:

this was really helpful. thanks

# June 14, 2011 7:24 PM

bi2002tec said:

You can run Visual Studio command prompt and use

[C:\>aspnet_regiis.exe - lk]

to see the full path including the SiteID for your command line utilities. It will be like (path version)

W3SVC/1/ROOT/TestApp1/ 2.0.50727.3053

W3SVC/1/ROOT/TestApp2/ 4.0.30319.0

# July 22, 2011 9:27 AM

bq284 said:

This was really helpful information, thanks for posting and sharing!

# August 7, 2011 12:34 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)