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:
robvde 2012-10-07 10:58:53 +04:00
parent 3047279632
commit 555fb75d5d
6 changed files with 26 additions and 23 deletions

View file

@ -37,6 +37,7 @@ using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.DNS;
using WebsitePanel.Server;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers.Web;
namespace WebsitePanel.EnterpriseServer
{
@ -1777,8 +1778,9 @@ namespace WebsitePanel.EnterpriseServer
// add main domain
int domainId = AddDomainInternal(domain.PackageId, domain.DomainName, createZone,
domain.IsSubDomain, false, domain.IsDomainPointer, false);
domain.IsSubDomain, createInstantAlias, domain.IsDomainPointer, false);
/*
if (domainId < 0)
return domainId;
@ -1788,6 +1790,7 @@ namespace WebsitePanel.EnterpriseServer
{
AddDomainInternal(domain.PackageId, domainAlias, true, false, true, false, false);
}
*/
return domainId;
}
@ -2209,24 +2212,22 @@ namespace WebsitePanel.EnterpriseServer
}
// add web site pointer if required
/*
if (domain.WebSiteId > 0 && instantAlias.WebSiteId == 0)
List<WebSite> sites = WebServerController.GetWebSites(domain.PackageId, false);
foreach (WebSite w in sites)
{
int webRes = WebServerController.AddWebSitePointer(domain.WebSiteId, hostName, domainId);
if (webRes < 0)
return webRes;
WebServerController.AddWebSitePointer( w.Id,
(w.Name.Replace("." + domain.ZoneName, "") == domain.ZoneName) ? "" : w.Name.Replace("." + domain.ZoneName, ""),
instantAlias.DomainId);
}
*/
// add mail domain pointer
/*
if (domain.MailDomainId > 0 && instantAlias.MailDomainId == 0)
{
int mailRes = MailServerController.AddMailDomainPointer(domain.MailDomainId, instantAliasId);
if (mailRes < 0)
return mailRes;
}
*/
return 0;
}

View file

@ -1118,7 +1118,7 @@ namespace WebsitePanel.EnterpriseServer
if (!string.IsNullOrEmpty(b.Host))
{
domain.DomainName = b.Host;
int domainID = ServerController.AddDomain(domain);
int domainID = ServerController.AddDomain(domain, domain.IsInstantAlias, false);
DomainInfo domainTmp = ServerController.GetDomain(domainID);
if (domainTmp != null)
{

View file

@ -5,11 +5,21 @@
</configSections>
<!-- Connection strings -->
<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>
<appSettings>
<!-- 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 -->
<add key="WebsitePanel.EncryptionEnabled" value="true" />
<!-- Web Applications -->

View file

@ -178,7 +178,7 @@ namespace WebsitePanel.Portal
try
{
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, "");
if (domainId < 0)

View file

@ -52,7 +52,7 @@ namespace WebsitePanel.Portal.ExchangeServer
{
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)
{

View file

@ -67,14 +67,6 @@ namespace WebsitePanel.Portal
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;
}