When creating an instant alias on a domain, all websites get updated with an
pointer based on instant alias and site name
This commit is contained in:
parent
3047279632
commit
555fb75d5d
6 changed files with 26 additions and 23 deletions
|
@ -37,6 +37,7 @@ using WebsitePanel.Providers.Common;
|
||||||
using WebsitePanel.Providers.DNS;
|
using WebsitePanel.Providers.DNS;
|
||||||
using WebsitePanel.Server;
|
using WebsitePanel.Server;
|
||||||
using WebsitePanel.Providers.ResultObjects;
|
using WebsitePanel.Providers.ResultObjects;
|
||||||
|
using WebsitePanel.Providers.Web;
|
||||||
|
|
||||||
namespace WebsitePanel.EnterpriseServer
|
namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
|
@ -1777,8 +1778,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
// add main domain
|
// add main domain
|
||||||
int domainId = AddDomainInternal(domain.PackageId, domain.DomainName, createZone,
|
int domainId = AddDomainInternal(domain.PackageId, domain.DomainName, createZone,
|
||||||
domain.IsSubDomain, false, domain.IsDomainPointer, false);
|
domain.IsSubDomain, createInstantAlias, domain.IsDomainPointer, false);
|
||||||
|
|
||||||
|
/*
|
||||||
if (domainId < 0)
|
if (domainId < 0)
|
||||||
return domainId;
|
return domainId;
|
||||||
|
|
||||||
|
@ -1788,6 +1790,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
AddDomainInternal(domain.PackageId, domainAlias, true, false, true, false, false);
|
AddDomainInternal(domain.PackageId, domainAlias, true, false, true, false, false);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
return domainId;
|
return domainId;
|
||||||
}
|
}
|
||||||
|
@ -2209,24 +2212,22 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
|
|
||||||
// add web site pointer if required
|
// add web site pointer if required
|
||||||
/*
|
List<WebSite> sites = WebServerController.GetWebSites(domain.PackageId, false);
|
||||||
if (domain.WebSiteId > 0 && instantAlias.WebSiteId == 0)
|
foreach (WebSite w in sites)
|
||||||
{
|
{
|
||||||
int webRes = WebServerController.AddWebSitePointer(domain.WebSiteId, hostName, domainId);
|
WebServerController.AddWebSitePointer( w.Id,
|
||||||
if (webRes < 0)
|
(w.Name.Replace("." + domain.ZoneName, "") == domain.ZoneName) ? "" : w.Name.Replace("." + domain.ZoneName, ""),
|
||||||
return webRes;
|
instantAlias.DomainId);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
// add mail domain pointer
|
|
||||||
/*
|
// add mail domain pointer
|
||||||
if (domain.MailDomainId > 0 && instantAlias.MailDomainId == 0)
|
if (domain.MailDomainId > 0 && instantAlias.MailDomainId == 0)
|
||||||
{
|
{
|
||||||
int mailRes = MailServerController.AddMailDomainPointer(domain.MailDomainId, instantAliasId);
|
int mailRes = MailServerController.AddMailDomainPointer(domain.MailDomainId, instantAliasId);
|
||||||
if (mailRes < 0)
|
if (mailRes < 0)
|
||||||
return mailRes;
|
return mailRes;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1118,7 +1118,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
if (!string.IsNullOrEmpty(b.Host))
|
if (!string.IsNullOrEmpty(b.Host))
|
||||||
{
|
{
|
||||||
domain.DomainName = b.Host;
|
domain.DomainName = b.Host;
|
||||||
int domainID = ServerController.AddDomain(domain);
|
int domainID = ServerController.AddDomain(domain, domain.IsInstantAlias, false);
|
||||||
DomainInfo domainTmp = ServerController.GetDomain(domainID);
|
DomainInfo domainTmp = ServerController.GetDomain(domainID);
|
||||||
if (domainTmp != null)
|
if (domainTmp != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,11 +5,21 @@
|
||||||
</configSections>
|
</configSections>
|
||||||
<!-- Connection strings -->
|
<!-- Connection strings -->
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="EnterpriseServer" connectionString="Server=(local)\SQLExpress;Database=WebsitePanel;uid=sa;pwd=Password12" providerName="System.Data.SqlClient" />
|
<!--
|
||||||
|
<add name="EnterpriseServer" connectionString="server=HSTPROV01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=aj7ep6fyhmw3b5qeth7c;" />
|
||||||
|
<add name="EnterpriseServer" connectionString="server=HSTWSP01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=pserxfbnlc6hwmdedbp0;" providerName="System.Data.SqlClient" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<add name="EnterpriseServer" connectionString="server=HSTPROV01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=aj7ep6fyhmw3b5qeth7c;" />
|
||||||
|
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<!-- Encryption util settings -->
|
<!-- Encryption util settings -->
|
||||||
<add key="WebsitePanel.CryptoKey" value="1234567890" />
|
<!--
|
||||||
|
<add key="WebsitePanel.CryptoKey" value="3x7eqt7zabc5n5afs6dg" />
|
||||||
|
<add key="WebsitePanel.CryptoKey" value="fr2ym4wn2gmbrj7dz336" />
|
||||||
|
-->
|
||||||
|
<add key="WebsitePanel.CryptoKey" value="3x7eqt7zabc5n5afs6dg" />
|
||||||
<!-- A1D4KDHUE83NKHddF -->
|
<!-- A1D4KDHUE83NKHddF -->
|
||||||
<add key="WebsitePanel.EncryptionEnabled" value="true" />
|
<add key="WebsitePanel.EncryptionEnabled" value="true" />
|
||||||
<!-- Web Applications -->
|
<!-- Web Applications -->
|
||||||
|
|
|
@ -178,7 +178,7 @@ namespace WebsitePanel.Portal
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
domainId = ES.Services.Servers.AddDomainWithProvisioning(PanelSecurity.PackageId,
|
domainId = ES.Services.Servers.AddDomainWithProvisioning(PanelSecurity.PackageId,
|
||||||
domainName, type, CreateWebSite.Checked, pointWebSiteId, pointMailDomainId,
|
domainName.ToLower(), type, CreateWebSite.Checked, pointWebSiteId, pointMailDomainId,
|
||||||
EnableDns.Checked, CreateInstantAlias.Checked, AllowSubDomains.Checked, "");
|
EnableDns.Checked, CreateInstantAlias.Checked, AllowSubDomains.Checked, "");
|
||||||
|
|
||||||
if (domainId < 0)
|
if (domainId < 0)
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
{
|
{
|
||||||
|
|
||||||
int itemId = ES.Services.Organizations.CreateOrganization(PanelSecurity.PackageId,
|
int itemId = ES.Services.Organizations.CreateOrganization(PanelSecurity.PackageId,
|
||||||
txtOrganizationID.Text.Trim(), txtOrganizationName.Text.Trim());
|
txtOrganizationID.Text.Trim().ToLower(), txtOrganizationName.Text.Trim().ToLower());
|
||||||
|
|
||||||
if (itemId < 0)
|
if (itemId < 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,14 +67,6 @@ namespace WebsitePanel.Portal
|
||||||
|
|
||||||
private void BindIgnoreZoneTemplate()
|
private void BindIgnoreZoneTemplate()
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
|
||||||
if (cntx.Quotas[Quotas.WEB_SITES].QuotaUsedValue > 0)
|
|
||||||
chkIgnoreGlobalDNSRecords.Visible = chkIgnoreGlobalDNSRecords.Checked = lblIgnoreGlobalDNSRecords.Visible = true;
|
|
||||||
else
|
|
||||||
chkIgnoreGlobalDNSRecords.Visible = chkIgnoreGlobalDNSRecords.Checked = lblIgnoreGlobalDNSRecords.Visible= false;
|
|
||||||
*/
|
|
||||||
|
|
||||||
chkIgnoreGlobalDNSRecords.Checked = false;
|
chkIgnoreGlobalDNSRecords.Checked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue