private void fromVersion2IisSite(XElement element) { IisSite = new WebsiteIisSite(); IisSite.Website = this; IisSite.Mode = element.GetElementValue <WebsiteIisMode>("IisMode", false); IisSite.SiteID = element.GetElementValue <int>("IisSiteID", true); IisSite.SiteName = element.GetElementValue <string>("IisSiteName", true); IisSite.RedirectUrl = element.GetElementValue <string>("IisRedirectUrl", true); IisSite.IdentitySid = element.GetElementValue <string>("IisIdentitySid", true); IisSite.IdentityUserName = element.GetElementValue <string>("IisIdentityUserName", true); IisSite.IdentityPassword = getPasswordFromElement(element, "IisIdentityPassword", true); IisSite.ApplicationPoolName = element.GetElementValue <string>("IisApplicationPoolName", true); IisSite.ManagedPipelineMode = element.GetElementValue <WebsiteIisManagedPipelineMode>("IisManagedPipelineMode", true); IisSite.ManagedRuntimeVersion = element.GetElementValue <string>("IisManagedRuntimeVersion", true); }
private void fromVersion3IisSite(XElement element) { XElement ise = element.Element("IisSite"); if (ise == null) { throw new Exception("No element for IisSite was found in the configuration."); } IisSite = new WebsiteIisSite(); IisSite.Website = this; IisSite.Mode = ise.GetElementValue <WebsiteIisMode>("IisMode", false); IisSite.SiteID = ise.GetElementValue <int>("IisSiteID", true); IisSite.SiteName = ise.GetElementValue <string>("IisSiteName", true); IisSite.RedirectUrl = ise.GetElementValue <string>("IisRedirectUrl", true); IisSite.IdentitySid = ise.GetElementValue <string>("IisIdentitySid", true); IisSite.IdentityUserName = ise.GetElementValue <string>("IisIdentityUserName", true); IisSite.IdentityPassword = getPasswordFromElement(ise, "IisIdentityPassword", true); IisSite.ApplicationPoolName = ise.GetElementValue <string>("IisApplicationPoolName", true); IisSite.ManagedPipelineMode = ise.GetElementValue <WebsiteIisManagedPipelineMode>("IisManagedPipelineMode", true); IisSite.ManagedRuntimeVersion = ise.GetElementValue <string>("IisManagedRuntimeVersion", true); }