Could not add contacts to a distribution lists
Create mailbox: room and equipment showed as numbers
Create Hosting Space: alignment of the hostname textbox
Webpointers: blank hostname did not register as dns alias
Webpublishing: generation of user name, username was not showing domain part
BackupWizard: ensured progress bar is at 100% when task is completed
Change mailbox plan did not update the size indicator
setup instruction tab is shown when there is no setup template
This commit is contained in:
robvde 2012-09-10 19:40:48 +04:00
parent bc0d70d1a4
commit 448429a5d2
13 changed files with 80 additions and 50 deletions

View file

@ -2,13 +2,14 @@
<configuration>
<!-- Connection strings -->
<connectionStrings>
<add name="EnterpriseServer" connectionString="Server=(local)\sqlexpress;Database=WebsitePanel;uid=WebsitePanel;pwd=password" providerName="System.Data.SqlClient"/>
<add name="EnterpriseServer" connectionString="server=HSTPROV01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=aj7ep6fyhmw3b5qeth7c;" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="AD.Username" value="DOMAIN\Administrator"/>
<add key="AD.Password" value="password"/>
<add key="AD.Username" value="HOSTING\Administrator"/>
<add key="AD.Password" value="P@ssw0rd"/>
<add key="AD.DomainController" value="HSTAD01.hosting.local"/>
<!-- Encryption util settings -->
<add key="WebsitePanel.CryptoKey" value="q26125qpakxmxmk477wb"/>
<add key="WebsitePanel.CryptoKey" value="3x7eqt7zabc5n5afs6dg"/>
<!-- Encryption -->
<add key="WebsitePanel.EncryptionEnabled" value="true"/>
<!-- Web Applications -->

View file

@ -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);

View file

@ -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")
{

View file

@ -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)
{

View file

@ -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))

View file

@ -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,

View file

@ -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"));
}
}
}

View file

@ -67,8 +67,9 @@
<tr>
<td colspan="2">
<wsp:AccountsList id="members" runat="server"
ShowOnlyMailboxes="true"
MailboxesEnabled="true"
MailboxesEnabled="true"
EnableMailboxOnly="true"
ContactsEnabled="true"
DistributionListsEnabled="true" />
</td>
</tr>

View file

@ -200,14 +200,5 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1;
/// <summary>
/// FormComments control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize FormComments;
}
}

View file

@ -146,6 +146,7 @@ namespace WebsitePanel.Portal.ExchangeServer
}
messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS");
BindSettings();
}
catch (Exception ex)
{

View file

@ -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"));

View file

@ -92,17 +92,15 @@
<table width="100%" cellpadding="4" cellspacing="0">
<tr>
<td class="Normal" width="40" nowrap rowspan="2"></td>
<td class="Normal" width="100%">
<td class="Normal">
<asp:CheckBox ID="chkCreateWebSite" runat="server" meta:resourcekey="chkCreateWebSite"
Text="Create Web Site" Checked="True" />
</td>
</tr>
<tr>
<td class="SubHead">
<td class="Normal" width="100%">
<asp:Label ID="lblHostName" runat="server" meta:resourcekey="lblHostName" Text="Host name:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtHostName" runat="server" CssClass="TextBox100" MaxLength="64"></asp:TextBox>
<asp:TextBox ID="txtHostName" runat="server" CssClass="NormalTextBox" Width="250px" MaxLength="64"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireHostName" runat="server" meta:resourcekey="valRequireHostName" ControlToValidate="txtHostName"
ErrorMessage="Enter hostname" ValidationGroup="CreateSite" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="valRequireCorrectHostName" runat="server"

View file

@ -259,7 +259,13 @@ namespace WebsitePanel.Portal
//
ToggleWmSvcControls(site);
AutoSuggestWmSvcAccontName(site);
//
if (!site.GetValue<bool>(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<bool>(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)