Bugfix for empty domain list when creating CSR request.
This commit is contained in:
parent
85fdf37a52
commit
04bc588a6a
1 changed files with 18 additions and 10 deletions
|
@ -107,15 +107,23 @@ namespace WebsitePanel.Portal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BindListOfAvailableSslDomains(ServerBinding[] siteBindings, SSLCertificate[] siteCertificates)
|
private void BindListOfAvailableSslDomains(ServerBinding[] siteBindings, SSLCertificate[] siteCertificates, string websiteName = "")
|
||||||
{
|
{
|
||||||
lstDomains.Items.Clear();
|
lstDomains.Items.Clear();
|
||||||
//
|
//
|
||||||
foreach (ServerBinding binding in siteBindings)
|
foreach (ServerBinding binding in siteBindings)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
lstDomains.Items.Add(new ListItem(binding.Host, binding.Host));
|
if (binding.IP.ToString().Length > 0 && binding.Host.Length == 0)
|
||||||
}
|
{
|
||||||
|
lstDomains.Items.Add(new ListItem(websiteName, websiteName));
|
||||||
|
lstDomains.Items.Add(new ListItem(String.Format("www.{0}", websiteName), String.Format("www.{0}", websiteName)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lstDomains.Items.Add(new ListItem(binding.Host, binding.Host));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BindWebItem(WebVirtualDirectory item)
|
public void BindWebItem(WebVirtualDirectory item)
|
||||||
|
@ -137,7 +145,7 @@ namespace WebsitePanel.Portal
|
||||||
|
|
||||||
SSLNotInstalled.Visible = true;
|
SSLNotInstalled.Visible = true;
|
||||||
//
|
//
|
||||||
BindListOfAvailableSslDomains(webSite.Bindings, certificates);
|
BindListOfAvailableSslDomains(webSite.Bindings, certificates, webSite.Name);
|
||||||
|
|
||||||
if (certificates.Length > 0)
|
if (certificates.Length > 0)
|
||||||
{
|
{
|
||||||
|
@ -560,7 +568,7 @@ namespace WebsitePanel.Portal
|
||||||
|
|
||||||
SSLNotInstalled.Visible = true;
|
SSLNotInstalled.Visible = true;
|
||||||
//
|
//
|
||||||
BindListOfAvailableSslDomains(item.Bindings, certificates);
|
BindListOfAvailableSslDomains(item.Bindings, certificates, item.Name);
|
||||||
|
|
||||||
if (certificates.Length > 0)
|
if (certificates.Length > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue