Revert SSL Binding Changes
This commit is contained in:
parent
4cb79c25c7
commit
464c53d3ac
2 changed files with 1 additions and 18 deletions
|
@ -437,7 +437,7 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
|||
//
|
||||
lock (((ICollection)iisObject.ChildElements).SyncRoot)
|
||||
{
|
||||
// remove all "http" and "https" bindings
|
||||
// remove all "http" bindings
|
||||
int i = 0;
|
||||
while (i < iisObject.Bindings.Count)
|
||||
{
|
||||
|
@ -446,11 +446,6 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
|||
iisObject.Bindings.RemoveAt(i);
|
||||
continue;
|
||||
}
|
||||
else if (String.Equals(iisObject.Bindings[i].Protocol, Uri.UriSchemeHttps, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
iisObject.Bindings.RemoveAt(i);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
i++;
|
||||
|
@ -459,17 +454,10 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
|||
|
||||
// Create HTTP bindings received
|
||||
foreach (var serverBinding in bindings)
|
||||
if (serverBinding.Port != "443")
|
||||
{
|
||||
var bindingInformation = String.Format("{0}:{1}:{2}", serverBinding.IP, serverBinding.Port, serverBinding.Host);
|
||||
iisObject.Bindings.Add(bindingInformation, Uri.UriSchemeHttp);
|
||||
}
|
||||
else
|
||||
{
|
||||
var bindingInformation = String.Format("{0}:{1}:{2}", serverBinding.IP, serverBinding.Port, serverBinding.Host);
|
||||
iisObject.Bindings.Add(bindingInformation, Uri.UriSchemeHttps);
|
||||
}
|
||||
|
||||
}
|
||||
//
|
||||
srvman.CommitChanges();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue