Fixed: Portal: SSL tab disappears when selecting
Fixed: Switch dedicated/shared ip ensured all bindings are cleared when switching
This commit is contained in:
parent
3d8fa9cf38
commit
37c44cdd63
3 changed files with 26 additions and 13 deletions
|
@ -646,11 +646,17 @@ namespace WebsitePanel.EnterpriseServer
|
|||
DeleteWebSitePointer(siteItemId, domain.DomainId, true, true, false);
|
||||
|
||||
// clear binding left overs
|
||||
List<ServerBinding> newBindings = new List<ServerBinding>();
|
||||
WebServer web = new WebServer();
|
||||
ServiceProviderProxy.Init(web, siteItem.ServiceId);
|
||||
WebSite site = web.GetSite(siteItem.SiteId);
|
||||
List<ServerBinding> newBindings = new List<ServerBinding>();
|
||||
try
|
||||
{
|
||||
web.UpdateSiteBindings(siteItem.SiteId, newBindings.ToArray(), true);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// update site item
|
||||
siteItem.SiteIPAddressId = addressId;
|
||||
|
@ -744,9 +750,16 @@ namespace WebsitePanel.EnterpriseServer
|
|||
// clear binding left overs
|
||||
WebServer web = new WebServer();
|
||||
ServiceProviderProxy.Init(web, siteItem.ServiceId);
|
||||
WebSite site = web.GetSite(siteItem.SiteId);
|
||||
List<ServerBinding> newBindings = new List<ServerBinding>();
|
||||
|
||||
try
|
||||
{
|
||||
web.UpdateSiteBindings(siteItem.SiteId, newBindings.ToArray(), true);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
//figure out the PackageAddressId
|
||||
|
|
|
@ -441,7 +441,8 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
|||
int i = 0;
|
||||
while (i < iisObject.Bindings.Count)
|
||||
{
|
||||
if (String.Equals(iisObject.Bindings[i].Protocol, Uri.UriSchemeHttp, StringComparison.InvariantCultureIgnoreCase))
|
||||
if ((String.Equals(iisObject.Bindings[i].Protocol, Uri.UriSchemeHttp, StringComparison.InvariantCultureIgnoreCase)) |
|
||||
(bindings.Length == 0))
|
||||
{
|
||||
iisObject.Bindings.RemoveAt(i);
|
||||
continue;
|
||||
|
|
|
@ -66,6 +66,7 @@ namespace WebsitePanel.Portal
|
|||
new Tab { Id = "mime", ResourceKey = "Tab.MIMETypes", Quota = Quotas.WEB_MIME, ViewId = "tabMimes" },
|
||||
new Tab { Id = "coldfusion", ResourceKey = "Tab.ColdFusion", Quota = Quotas.WEB_COLDFUSION, ViewId = "tabCF" },
|
||||
new Tab { Id = "webman", ResourceKey = "Tab.WebManagement", Quota = Quotas.WEB_REMOTEMANAGEMENT, ViewId = "tabWebManagement" },
|
||||
new Tab { Id = "SSL", ResourceKey = "Tab.SSL", Quota = Quotas.WEB_SSL, ViewId = "SSL" },
|
||||
};
|
||||
|
||||
private int PackageId
|
||||
|
@ -256,15 +257,13 @@ namespace WebsitePanel.Portal
|
|||
webSitesCustomErrorsControl.BindWebItem(site);
|
||||
if (site.SiteIPAddress != null)
|
||||
{
|
||||
TabsList.Add(new Tab { Id = "SSL", ResourceKey = "Tab.SSL", Quota = Quotas.WEB_SSL, ViewId = "SSL" });
|
||||
TabsList.ForEach((x) =>
|
||||
{
|
||||
x.Name = GetLocalizedString(x.ResourceKey);
|
||||
x.ResourceGroup = x.ResourceGroup ?? ResourceGroups.Web;
|
||||
});
|
||||
|
||||
WebsitesSSLControl.Visible = true;
|
||||
WebsitesSSLControl.BindWebItem(site);
|
||||
}
|
||||
else
|
||||
{
|
||||
WebsitesSSLControl.Visible = false;
|
||||
}
|
||||
|
||||
BindVirtualDirectories();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue