fix comments of wsp-10299 Web Publishing not created in IIS 8.5

This commit is contained in:
Alexander Trofimov 2015-01-30 16:28:04 +07:00
parent 0e130a7af0
commit 880c241683
2 changed files with 20 additions and 0 deletions

View file

@ -3633,6 +3633,17 @@ namespace WebsitePanel.EnterpriseServer
WebServer server = GetWebServer(item.ServiceId); WebServer server = GetWebServer(item.ServiceId);
// //
server.RevokeWebManagementAccess(item.SiteId, accountName); server.RevokeWebManagementAccess(item.SiteId, accountName);
// Cleanup web site properties if the web management and web deploy user are the same
if (GetNonQualifiedAccountName(accountName) == item.WebDeployPublishingAccount)
{
item.WebDeployPublishingAccount = String.Empty;
item.WebDeploySitePublishingEnabled = false;
item.WebDeploySitePublishingProfile = String.Empty;
item.WebDeployPublishingPassword = String.Empty;
// Put changes into effect
PackageController.UpdatePackageItem(item);
}
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -3644,6 +3655,12 @@ namespace WebsitePanel.EnterpriseServer
} }
} }
protected static string GetNonQualifiedAccountName(string accountName)
{
int idx = accountName.LastIndexOf("\\");
return (idx != -1) ? accountName.Substring(idx + 1) : accountName;
}
public static ResultObject ChangeWebManagementAccessPassword(int siteItemId, string accountPassword) public static ResultObject ChangeWebManagementAccessPassword(int siteItemId, string accountPassword)
{ {
ResultObject result = new ResultObject { IsSuccess = true }; ResultObject result = new ResultObject { IsSuccess = true };

View file

@ -4133,6 +4133,9 @@ namespace WebsitePanel.Providers.Web
// Restore setting back // Restore setting back
ServerSettings.ADEnabled = adEnabled; ServerSettings.ADEnabled = adEnabled;
} }
//
RemoveDelegationRulesRestrictions(siteName, accountName);
} }
private void ReadWebDeployPublishingAccessDetails(WebVirtualDirectory iisObject) private void ReadWebDeployPublishingAccessDetails(WebVirtualDirectory iisObject)