Revert changes to exchange 2013 provider
Fix applied on deadlock for scheduled task Support added to server configuration for powershell remoting
This commit is contained in:
parent
484e7102b8
commit
b00e11a2b9
7 changed files with 108 additions and 4 deletions
|
@ -33,6 +33,7 @@ using System.Collections;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
|
||||||
namespace WebsitePanel.EnterpriseServer
|
namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
|
@ -145,7 +146,22 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
schedule.ScheduleInfo.LastRun = DateTime.Now;
|
schedule.ScheduleInfo.LastRun = DateTime.Now;
|
||||||
|
|
||||||
// update schedule
|
// update schedule
|
||||||
|
int MAX_RETRY_COUNT = 10;
|
||||||
|
int counter = 0;
|
||||||
|
while (counter < MAX_RETRY_COUNT)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
SchedulerController.UpdateSchedule(schedule.ScheduleInfo);
|
SchedulerController.UpdateSchedule(schedule.ScheduleInfo);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
catch (SqlException)
|
||||||
|
{
|
||||||
|
System.Threading.Thread.Sleep(1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
counter++;
|
||||||
|
}
|
||||||
|
|
||||||
// skip execution if the current task is still running
|
// skip execution if the current task is still running
|
||||||
scheduledTasks = TaskManager.GetScheduledTasks();
|
scheduledTasks = TaskManager.GetScheduledTasks();
|
||||||
|
@ -156,9 +172,15 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception Ex)
|
catch (Exception Ex)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
TaskManager.WriteError(string.Format("RunSchedule Error : {0}", Ex.Message));
|
TaskManager.WriteError(string.Format("RunSchedule Error : {0}", Ex.Message));
|
||||||
}
|
}
|
||||||
|
catch(Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,8 +119,14 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
// complete task
|
// complete task
|
||||||
|
try
|
||||||
|
{
|
||||||
TaskManager.CompleteTask();
|
TaskManager.CompleteTask();
|
||||||
}
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<!-- Display Settings -->
|
<!-- Display Settings -->
|
||||||
<PortalName>WebsitePanel</PortalName>
|
<PortalName>WebsitePanel</PortalName>
|
||||||
<!-- Enterprise Server -->
|
<!-- Enterprise Server -->
|
||||||
<EnterpriseServer>http://localhost:9002</EnterpriseServer>
|
<EnterpriseServer>http://hstprov01.hosting.local:9002</EnterpriseServer>
|
||||||
<!-- General Settings -->
|
<!-- General Settings -->
|
||||||
<CultureCookieName>UserCulture</CultureCookieName>
|
<CultureCookieName>UserCulture</CultureCookieName>
|
||||||
<ThemeCookieName>UserTheme</ThemeCookieName>
|
<ThemeCookieName>UserTheme</ThemeCookieName>
|
||||||
|
|
|
@ -192,4 +192,10 @@
|
||||||
<data name="locMailboxDAG.Text" xml:space="preserve">
|
<data name="locMailboxDAG.Text" xml:space="preserve">
|
||||||
<value>Database Availability Group:</value>
|
<value>Database Availability Group:</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="lblPowerShellUrl.Text" xml:space="preserve">
|
||||||
|
<value>e.g. http://server.domain.com/PowerShell</value>
|
||||||
|
</data>
|
||||||
|
<data name="locPowerShellUrl.Text" xml:space="preserve">
|
||||||
|
<value>Powershell URL:</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -1,6 +1,25 @@
|
||||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Exchange_Settings.ascx.cs"
|
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Exchange_Settings.ascx.cs"
|
||||||
Inherits="WebsitePanel.Portal.ProviderControls.Exchange2010_Settings" %>
|
Inherits="WebsitePanel.Portal.ProviderControls.Exchange2010_Settings" %>
|
||||||
<table cellpadding="3" cellspacing="0" width="100%">
|
<table cellpadding="3" cellspacing="0" width="100%">
|
||||||
|
|
||||||
|
<tr runat="server" id="powershellUrl1" width="200" nowrap>
|
||||||
|
<td class="SubHead">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<asp:Label runat="server" ID="lblFileServiceInfo" meta:resourcekey="lblPowerShellUrl" Text="e.g. http://server.domain.com/PowerShell" Font-Italic="true"></asp:Label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr runat="server" id="powershellUrl2" width="200" nowrap>
|
||||||
|
<td class="SubHead">
|
||||||
|
<asp:Localize ID="loclocPowerShellUrl" runat="server" meta:resourcekey="locPowerShellUrl"
|
||||||
|
Text="Powershell URL:"></asp:Localize>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox ID="txtPowerShellUrl" runat="server" Width="400px"></asp:TextBox>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr runat="server" id="storageGroup">
|
<tr runat="server" id="storageGroup">
|
||||||
<td class="SubHead" width="200" nowrap>
|
<td class="SubHead" width="200" nowrap>
|
||||||
<asp:Localize ID="locStorageGroup" runat="server" meta:resourcekey="locStorageGroup" Text="Storage Group Name:"></asp:Localize>
|
<asp:Localize ID="locStorageGroup" runat="server" meta:resourcekey="locStorageGroup" Text="Storage Group Name:"></asp:Localize>
|
||||||
|
|
|
@ -91,6 +91,8 @@ namespace WebsitePanel.Portal.ProviderControls
|
||||||
txtStorageGroup.Text = "";
|
txtStorageGroup.Text = "";
|
||||||
|
|
||||||
locMailboxDAG.Visible = false;
|
locMailboxDAG.Visible = false;
|
||||||
|
|
||||||
|
powershellUrl1.Visible = powershellUrl2.Visible = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXCHANGE2010SP2_PROVIDER_ID:
|
case EXCHANGE2010SP2_PROVIDER_ID:
|
||||||
|
@ -101,6 +103,7 @@ namespace WebsitePanel.Portal.ProviderControls
|
||||||
txtStorageGroup.Text = "";
|
txtStorageGroup.Text = "";
|
||||||
|
|
||||||
locMailboxDatabase.Visible = false;
|
locMailboxDatabase.Visible = false;
|
||||||
|
powershellUrl1.Visible = powershellUrl2.Visible = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EXCHANGE2013_PROVIDER_ID:
|
case EXCHANGE2013_PROVIDER_ID:
|
||||||
|
@ -111,6 +114,7 @@ namespace WebsitePanel.Portal.ProviderControls
|
||||||
txtStorageGroup.Text = "";
|
txtStorageGroup.Text = "";
|
||||||
|
|
||||||
locMailboxDatabase.Visible = false;
|
locMailboxDatabase.Visible = false;
|
||||||
|
powershellUrl1.Visible = powershellUrl2.Visible = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -147,6 +151,7 @@ namespace WebsitePanel.Portal.ProviderControls
|
||||||
txtActiveSyncServer.Text = settings["ActiveSyncServer"];
|
txtActiveSyncServer.Text = settings["ActiveSyncServer"];
|
||||||
txtOABServer.Text = settings["OABServer"];
|
txtOABServer.Text = settings["OABServer"];
|
||||||
txtPublicFolderServer.Text = settings["PublicFolderServer"];
|
txtPublicFolderServer.Text = settings["PublicFolderServer"];
|
||||||
|
txtPowerShellUrl.Text = settings["PowerShellUrl"];
|
||||||
|
|
||||||
UpdateHubTransportsGrid();
|
UpdateHubTransportsGrid();
|
||||||
UpdateClientAccessGrid();
|
UpdateClientAccessGrid();
|
||||||
|
@ -173,6 +178,7 @@ namespace WebsitePanel.Portal.ProviderControls
|
||||||
settings["PublicFolderServer"] = txtPublicFolderServer.Text;
|
settings["PublicFolderServer"] = txtPublicFolderServer.Text;
|
||||||
|
|
||||||
settings["StorageGroup"] = txtStorageGroup.Text;
|
settings["StorageGroup"] = txtStorageGroup.Text;
|
||||||
|
settings["PowerShellUrl"] = txtPowerShellUrl.Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BindExchangeServices(DropDownList ddl, bool isHubservice)
|
public void BindExchangeServices(DropDownList ddl, bool isHubservice)
|
||||||
|
|
|
@ -12,6 +12,51 @@ namespace WebsitePanel.Portal.ProviderControls {
|
||||||
|
|
||||||
public partial class Exchange2010_Settings {
|
public partial class Exchange2010_Settings {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// powershellUrl1 control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlTableRow powershellUrl1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lblFileServiceInfo 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.Label lblFileServiceInfo;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// powershellUrl2 control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlTableRow powershellUrl2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// loclocPowerShellUrl 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 loclocPowerShellUrl;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtPowerShellUrl 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.TextBox txtPowerShellUrl;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// storageGroup control.
|
/// storageGroup control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue