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:
Do the remote IIS sites have to be pre-created? I have a product that utilizes 9 IIS sites and will need to be synchronized across 6 servers. Do I need to go create all the sites first?
How does the synchronization of a site handle settings that should not
be synchronized, such as IP Address?
It appears from the documentation that to synchronize sites I have to know the
metakey (ADSI metadata path) for a site. I don't typically know this path; I know the name of the site. Making this a requirement means that I have to maintain another mapping, a mapping between site names and metakey paths. Then this gets worse;
am I going to need to keep a mapping of site names and metadata paths for each site on each server? The metadata paths associated with a particular site will not be the same across servers.
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.
This posting is provided "AS IS" with no warranties, and confers no rights.
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.
mikeyfev1
21 Posts
Questions about setup and usage of this tool
Aug 19, 2008 03:28 PM|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:
ninatang
46 Posts
Microsoft
Re: Questions about setup and usage of this tool
Aug 19, 2008 03:43 PM|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.
yaminij
239 Posts
Microsoft
Re: Questions about setup and usage of this tool
Aug 19, 2008 06:29 PM|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.
using System.DirectoryServices;
public static string GetSiteId(string strIISPath, string webSiteName)
{
try
{
string strSiteId = string.Empty;
if (DirectoryEntry.Exists(strIISPath))
{
DirectoryEntry obj = new DirectoryEntry(strIISPath);
foreach (DirectoryEntry temp in obj.Children)
{
if (Convert.ToString(temp.Properties["ServerComment"].Value).ToLower() == webSiteName.ToLower())
{
strSiteId = temp.Name;
break;
}
}
}
return strSiteId;
}
catch (Exception e)
{
}
}
You can call the above code with
string strWebSiteId = GetSiteId("IIS://localhost/w3svc", websiteName)