diff --git a/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/App.config b/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/App.config index 6f20ce02..fdabf2b0 100644 --- a/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/App.config +++ b/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/App.config @@ -2,13 +2,14 @@ - + - - + + + - + diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/Utils.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/Utils.cs index f2cb1596..c20f5be6 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/Utils.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/Utils.cs @@ -91,10 +91,24 @@ namespace WebsitePanel.EnterpriseServer return (string[])list.ToArray(typeof(string)); } + public static string ReplaceStringVariable(string str, string variable, string value) { - if (String.IsNullOrEmpty(str) || String.IsNullOrEmpty(value)) - return str; + return ReplaceStringVariable(str, variable, value, false); + } + + public static string ReplaceStringVariable(string str, string variable, string value, bool allowEmptyValue) + { + if (allowEmptyValue) + { + if (String.IsNullOrEmpty(str)) return str; + if (String.IsNullOrEmpty(value)) return string.Empty; + } + else + { + if (String.IsNullOrEmpty(str) || String.IsNullOrEmpty(value)) + return str; + } Regex re = new Regex("\\[" + variable + "\\]+", RegexOptions.IgnoreCase); return re.Replace(str, value); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DnsServers/DnsServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DnsServers/DnsServerController.cs index 056960bb..1c90e844 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DnsServers/DnsServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DnsServers/DnsServerController.cs @@ -279,7 +279,7 @@ namespace WebsitePanel.EnterpriseServer { DnsRecord rr = new DnsRecord(); rr.RecordType = (DnsRecordType)Enum.Parse(typeof(DnsRecordType), record.RecordType, true); - rr.RecordName = Utils.ReplaceStringVariable(record.RecordName, "host_name", hostName); + rr.RecordName = Utils.ReplaceStringVariable(record.RecordName, "host_name", hostName, true); if (record.RecordType == "A" || record.RecordType == "AAAA") { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupController.cs index 8d5d0c8c..a580954a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupController.cs @@ -186,7 +186,8 @@ namespace WebsitePanel.EnterpriseServer IBackupController controller = null; try { - controller = Activator.CreateInstance(Type.GetType(group.GroupController)) as IBackupController; + if (group.GroupController != null) + controller = Activator.CreateInstance(Type.GetType(group.GroupController)) as IBackupController; if (controller != null) { // backup items @@ -342,6 +343,7 @@ namespace WebsitePanel.EnterpriseServer } } + TaskManager.IndicatorCurrent = TaskManager.IndicatorMaximum; } catch (Exception ex) { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs index 07769d20..ea29ce5f 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs @@ -765,6 +765,7 @@ namespace WebsitePanel.EnterpriseServer TaskManager.StartTask("WEB_SITE", "ADD_POINTER", siteItem.Name); TaskManager.ItemId = siteItemId; TaskManager.WriteParameter("Domain pointer", domain.DomainName); + TaskManager.WriteParameter("Host name", hostName); try { @@ -1995,6 +1996,12 @@ namespace WebsitePanel.EnterpriseServer // WebServer server = GetWebServer(item.ServiceId); + StringDictionary webSettings = ServerController.GetServiceSettings(item.ServiceId); + if (webSettings["WmSvc.NETBIOS"] != null) + { + accountName = webSettings["WmSvc.NETBIOS"].ToString() + "\\" + accountName; + } + // Most part of the functionality used to enable Web Deploy publishing correspond to those created for Web Management purposes, // so we can re-use the existing functionality to deliver seamless development experience. if (server.CheckWebManagementAccountExists(accountName)) diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/SecurityUtils.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/SecurityUtils.cs index 7a3f5d77..fbdecf14 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/SecurityUtils.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/SecurityUtils.cs @@ -918,7 +918,16 @@ namespace WebsitePanel.Providers.Utils private static string GetUserName(string userName, RemoteServerSettings serverSettings) { - return userName.Replace(serverSettings.ADRootDomain + "\\", ""); + if (userName.Contains("\\")) + { + string[] tmp = userName.Split('\\'); + if (tmp.Length > 1) + return tmp[1]; + else + return tmp[0]; + } + else + return userName; } private static DirectoryEntry GetUserObject(DirectoryEntry objRoot, string userName, diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs index 1b76f43d..abe732d9 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs @@ -77,17 +77,16 @@ namespace WebsitePanel.Portal.ExchangeServer if (plans.Length == 0) btnCreate.Enabled = false; - } - - PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); - if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER)) - { - if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1) + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); + if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER)) { - locSubscriberNumber.Visible = txtSubscriberNumber.Visible = valRequireSubscriberNumber.Enabled = false; - rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("RoomMailbox"),"5")); - rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("EquipmentMailbox"),"6")); + if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1) + { + locSubscriberNumber.Visible = txtSubscriberNumber.Visible = valRequireSubscriberNumber.Enabled = false; + rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("RoomMailbox.Text"), "5")); + rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("EquipmentMailbox.Text"), "6")); + } } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListGeneralSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListGeneralSettings.ascx index b9b689d4..e9f107a8 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListGeneralSettings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListGeneralSettings.ascx @@ -67,8 +67,9 @@ diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListGeneralSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListGeneralSettings.ascx.designer.cs index 4c435967..718d4169 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListGeneralSettings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeDistributionListGeneralSettings.ascx.designer.cs @@ -200,14 +200,5 @@ namespace WebsitePanel.Portal.ExchangeServer { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1; - - /// - /// FormComments control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Localize FormComments; } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs index cc870235..f2ea7f15 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs @@ -146,6 +146,7 @@ namespace WebsitePanel.Portal.ExchangeServer } messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS"); + BindSettings(); } catch (Exception ex) { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.cs index 0b9392be..fb43a86e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxTabs.ascx.cs @@ -68,7 +68,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls if (!hideItems) tabsList.Add(CreateTab("mailbox_addresses", "Tab.Addresses")); if (!hideItems) tabsList.Add(CreateTab("mailbox_mailflow", "Tab.Mailflow")); if (!hideItems) tabsList.Add(CreateTab("mailbox_permissions", "Tab.Permissions")); - tabsList.Add(CreateTab("mailbox_setup", "Tab.Setup")); + + string instructions = ES.Services.ExchangeServer.GetMailboxSetupInstructions(PanelRequest.ItemID, PanelRequest.AccountID, false, false, false); + if (!string.IsNullOrEmpty(instructions)) + tabsList.Add(CreateTab("mailbox_setup", "Tab.Setup")); + if (!hideItems) tabsList.Add(CreateTab("mailbox_mobile", "Tab.Mobile")); //tabsList.Add(CreateTab("mailbddox_spam", "Tab.Spam")); diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserCreateSpace.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserCreateSpace.ascx index ea9f99f0..f6821a51 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserCreateSpace.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserCreateSpace.ascx @@ -92,17 +92,15 @@ - - -
+
+ - - + (WebVirtualDirectory.WmSvcSiteEnabled)) + { + txtWmSvcAccountName.Text = AutoSuggestWmSvcAccontName(site, "_admin"); + } + ToggleWmSvcConnectionHint(site); // Web Deploy Publishing @@ -489,6 +495,8 @@ namespace WebsitePanel.Portal WDeployPublishingPasswordTextBox, WDeployPublishingConfirmPasswordTextBox, WDeployPublishingAccountRequiredFieldValidator); + + WDeployPublishingAccountTextBox.Text = AutoSuggestWmSvcAccontName(item, "_dploy"); // WDeployPublishingAccountRequiredFieldValidator.Enabled = true; // @@ -569,27 +577,22 @@ namespace WebsitePanel.Portal #region WmSvc Management - private void AutoSuggestWmSvcAccontName(WebVirtualDirectory item) + private string AutoSuggestWmSvcAccontName(WebVirtualDirectory item, string suffix) { - bool wmSvcItemEnabled = item.GetValue(WebVirtualDirectory.WmSvcSiteEnabled); + string autoSuggestedPart = item.Name; // - if (!wmSvcItemEnabled) + if (autoSuggestedPart.Length > 14) { - string autoSuggestedPart = item.Name; + autoSuggestedPart = autoSuggestedPart.Substring(0, 14); // - if (autoSuggestedPart.Length > 14) + while (!String.IsNullOrEmpty(autoSuggestedPart) && + !Char.IsLetterOrDigit(autoSuggestedPart[autoSuggestedPart.Length - 1])) { - autoSuggestedPart = autoSuggestedPart.Substring(0, 14); - // - while (!String.IsNullOrEmpty(autoSuggestedPart) && - !Char.IsLetterOrDigit(autoSuggestedPart[autoSuggestedPart.Length - 1])) - { - autoSuggestedPart = autoSuggestedPart.Substring(0, autoSuggestedPart.Length - 1); - } + autoSuggestedPart = autoSuggestedPart.Substring(0, autoSuggestedPart.Length - 1); } - // - txtWmSvcAccountName.Text = autoSuggestedPart + "_admin"; } + // + return autoSuggestedPart + suffix; } private void ToggleWmSvcControls(WebVirtualDirectory item)