diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Servers/ServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Servers/ServerController.cs index 02ff0fed..7fc22adb 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Servers/ServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Servers/ServerController.cs @@ -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 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 - /* + // 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; } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs index ec3f3bd9..84403264 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs @@ -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) { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config index 3766094f..e074b81a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config @@ -5,11 +5,21 @@ - + + + + - + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs index 43544f38..39d42feb 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs @@ -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) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateOrganization.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateOrganization.ascx.cs index 73fcbb7a..6418b364 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateOrganization.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateOrganization.ascx.cs @@ -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) { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesAddSite.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesAddSite.ascx.cs index 88417d42..c7291b75 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesAddSite.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesAddSite.ascx.cs @@ -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; }