Web Deployment Tool (MS Deploy)
Questions about setup and usage of this tool
Last post Aug 19, 2008 06:29 PM by yaminij
Aug 19, 2008 03:28 PM|mikeyfev1|LINK
While I wait for the answer to why I can't get the remote service to start (another posting)...
I have some questions about using this tool:
Aug 19, 2008 03:43 PM|ninatang|LINK
1. No. If you sync an existing site to a site that doesn't exist, MS Deploy will create the site for you.
2. You can use skip or replace rules to either skip synchronization or replace values for these settings. For more information on how to use these rules, see
this blog entry.
3. The reason this is the case is because the site ID is the unique identifier in IIS6. A site name could correspond to multiple sites. I'm not that familiar with IIS6, but there's probably a way to get the IDs from the names so you don't have to maintain
your own mapping. Also, if you can migrate your servers to IIS7, the name is a unique identifier, so MS Deploy uses names instead of ids for those sites.
Aug 19, 2008 06:29 PM|yaminij|LINK
Here is a piece of code that will help you find the site id associated with a particular sitename on an IIS 6.0 machine. The limitation of this code is that if you have multiple sites with the same name (this is possible in IIS 6.0), the code will return
the site id of the first site it comes across.
public static string GetSiteId(string strIISPath, string webSiteName)
string strSiteId = string.Empty;
DirectoryEntry obj = new DirectoryEntry(strIISPath);
foreach (DirectoryEntry temp in obj.Children)
if (Convert.ToString(temp.Properties["ServerComment"].Value).ToLower() == webSiteName.ToLower())
strSiteId = temp.Name;
catch (Exception e)
You can call the above code with
string strWebSiteId = GetSiteId("IIS://localhost/w3svc", websiteName)