Fixed: Switch to dedicated fails when externalip is null
This commit is contained in:
parent
0d3589c2b6
commit
cdb3883d9a
1 changed files with 8 additions and 2 deletions
|
@ -270,10 +270,13 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
if (dedicatedIp)
|
if (dedicatedIp)
|
||||||
{
|
{
|
||||||
foreach (GlobalDnsRecord d in dnsRecords)
|
foreach (GlobalDnsRecord d in dnsRecords)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(d.ExternalIP))
|
||||||
{
|
{
|
||||||
if (regIP.IsMatch(d.ExternalIP)) return BusinessErrorCodes.ERROR_GLOBALDNS_FOR_DEDICATEDIP;
|
if (regIP.IsMatch(d.ExternalIP)) return BusinessErrorCodes.ERROR_GLOBALDNS_FOR_DEDICATEDIP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// prepare site bindings
|
// prepare site bindings
|
||||||
List<ServerBinding> bindings = new List<ServerBinding>();
|
List<ServerBinding> bindings = new List<ServerBinding>();
|
||||||
|
@ -652,9 +655,12 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
List<GlobalDnsRecord> dnsRecords = ServerController.GetDnsRecordsByService(siteItem.ServiceId);
|
List<GlobalDnsRecord> dnsRecords = ServerController.GetDnsRecordsByService(siteItem.ServiceId);
|
||||||
|
|
||||||
foreach (GlobalDnsRecord d in dnsRecords)
|
foreach (GlobalDnsRecord d in dnsRecords)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(d.ExternalIP))
|
||||||
{
|
{
|
||||||
if (regIP.IsMatch(d.ExternalIP)) return BusinessErrorCodes.ERROR_GLOBALDNS_FOR_DEDICATEDIP;
|
if (regIP.IsMatch(d.ExternalIP)) return BusinessErrorCodes.ERROR_GLOBALDNS_FOR_DEDICATEDIP;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// place log record
|
// place log record
|
||||||
TaskManager.StartTask("WEB_SITE", "SWITCH_TO_DEDICATED_IP", siteItem.Name);
|
TaskManager.StartTask("WEB_SITE", "SWITCH_TO_DEDICATED_IP", siteItem.Name);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue