Fixed BlackBerry 5 Provider: admin tool now invoked with the -n <FQDN> option.

Ensure you configure the FQDN in the provider configuration e.g.
bes01.hosting.local:3443
This commit is contained in:
robvde 2012-07-31 17:19:10 +04:00
parent 6942c229fe
commit aee7e0f358
7 changed files with 78 additions and 20 deletions

View file

@ -62,6 +62,8 @@ namespace WebsitePanel.Providers.Common
public const string EnterpriseServer = "EnterpriseServer"; public const string EnterpriseServer = "EnterpriseServer";
public const string EnterpriseServerFQDN = "EnterpriseServerFQDN";
public const string AdministrationToolService = "AdministrationToolService"; public const string AdministrationToolService = "AdministrationToolService";

View file

@ -72,11 +72,12 @@ namespace WebsitePanel.Providers.HostedSolution
return res; return res;
} }
string arguments = string.Format("-username {0} -password {1} -add -u {2} -b {3}", string arguments = string.Format("-username {0} -password {1} -add -u {2} -b {3} -n {4}",
User, User,
Password, Password,
primaryEmailAddress, primaryEmailAddress,
EnterpriseServer); EnterpriseServer,
EnterpriseServerFQDN);
try try
{ {
@ -119,13 +120,14 @@ namespace WebsitePanel.Providers.HostedSolution
return res; return res;
} }
string arguments = string.Format(" -username {0} -password {1} -change -u {2} -b {3} -w {4} -wt {5}", string arguments = string.Format(" -username {0} -password {1} -change -u {2} -b {3} -w {4} -wt {5} -n {6}",
User, User,
Password, Password,
primaryEmailAddress, primaryEmailAddress,
EnterpriseServer, EnterpriseServer,
password, password,
time); time,
EnterpriseServerFQDN);
try try
{ {
@ -163,11 +165,12 @@ namespace WebsitePanel.Providers.HostedSolution
return res; return res;
} }
string arguments = string.Format("-username {0} -password {1} -change -u {2} -b {3} -cw", string arguments = string.Format("-username {0} -password {1} -change -u {2} -b {3} -cw -n {4}",
User, User,
Password, Password,
primaryEmailAddress, primaryEmailAddress,
EnterpriseServer); EnterpriseServer,
EnterpriseServerFQDN);
try try
{ {
@ -214,11 +217,12 @@ namespace WebsitePanel.Providers.HostedSolution
return res; return res;
} }
string arguments = string.Format("-username {0} -password {1} -change -u {2} -b {3} -wrandom", string arguments = string.Format("-username {0} -password {1} -change -u {2} -b {3} -wrandom -n {4}",
User, User,
Password, Password,
primaryEmailAddress, primaryEmailAddress,
EnterpriseServer); EnterpriseServer,
EnterpriseServerFQDN);
try try
{ {
@ -256,11 +260,12 @@ namespace WebsitePanel.Providers.HostedSolution
return res; return res;
} }
string arguments = string.Format("-username {0} -password {1} -kill_handheld -u {2} -b {3}", string arguments = string.Format("-username {0} -password {1} -kill_handheld -u {2} -b {3} -n {4}",
User, User,
Password, Password,
primaryEmailAddress, primaryEmailAddress,
EnterpriseServer); EnterpriseServer,
EnterpriseServerFQDN);
try try
@ -346,11 +351,12 @@ namespace WebsitePanel.Providers.HostedSolution
return res; return res;
} }
string arguments = string.Format(" -username {0} -password {1} -stats -u {2} -b {3}", string arguments = string.Format(" -username {0} -password {1} -stats -u {2} -b {3} -n {4}",
User, User,
Password, Password,
primaryEmailAddress, primaryEmailAddress,
EnterpriseServer); EnterpriseServer,
EnterpriseServerFQDN);
string output; string output;
string error; string error;
@ -421,11 +427,12 @@ namespace WebsitePanel.Providers.HostedSolution
return res; return res;
} }
string arguments = string.Format("-username {0} -password {1} -delete -u {2} -b {3}", string arguments = string.Format("-username {0} -password {1} -delete -u {2} -b {3} -n {4}",
User, User,
Password, Password,
primaryEmailAddress, primaryEmailAddress,
EnterpriseServer); EnterpriseServer,
EnterpriseServerFQDN);
try try
{ {

View file

@ -75,6 +75,15 @@ namespace WebsitePanel.Providers.HostedSolution
} }
} }
public string EnterpriseServerFQDN
{
get
{
return ProviderSettings[Constants.EnterpriseServerFQDN];
}
}
public ResultObject CreateBlackBerryUser(string primaryEmailAddress) public ResultObject CreateBlackBerryUser(string primaryEmailAddress)
{ {
return CreateBlackBerryUserInternal(primaryEmailAddress); return CreateBlackBerryUserInternal(primaryEmailAddress);

View file

@ -112,14 +112,17 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="lblEnterpriseServer.Text" xml:space="preserve"> <data name="lblEnterpriseServer.Text" xml:space="preserve">
<value>BlackBerry Enterprise Server instance:</value> <value>BlackBerry Enterprise Server instance:</value>
</data> </data>
<data name="lblEnterpriseServerFQDN.Text" xml:space="preserve">
<value>BlackBerry Enterprise Server FQDN:</value>
</data>
<data name="lblPassword.Text" xml:space="preserve"> <data name="lblPassword.Text" xml:space="preserve">
<value>Authentication password:</value> <value>Authentication password:</value>
</data> </data>

View file

@ -31,4 +31,13 @@
</td> </td>
</tr> </tr>
<tr>
<td class="SubHead" width="200" nowrap><asp:Label runat="server" ID="lblEnterpriseServerFQDN" meta:resourcekey="lblEnterpriseServerFQDN" /></td>
<td>
<asp:TextBox runat="server" ID="txtEnterpriseServerFQDN" MaxLength="256" Width="200px" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtEnterpriseServerFQDN" Display="Dynamic" ErrorMessage="*" />
</td>
</tr>
</table> </table>

View file

@ -32,7 +32,7 @@ using WebsitePanel.Providers.Common;
namespace WebsitePanel.Portal.ProviderControls namespace WebsitePanel.Portal.ProviderControls
{ {
public partial class BlackBerry5_Settings: WebsitePanelControlBase, IHostingServiceProviderSettings public partial class BlackBerry5_Settings : WebsitePanelControlBase, IHostingServiceProviderSettings
{ {
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
@ -44,6 +44,7 @@ namespace WebsitePanel.Portal.ProviderControls
txtPath.Text = settings[Constants.UtilityPath]; txtPath.Text = settings[Constants.UtilityPath];
txtPassword.Text = settings[Constants.Password]; txtPassword.Text = settings[Constants.Password];
txtEnterpriseServer.Text = settings[Constants.EnterpriseServer]; txtEnterpriseServer.Text = settings[Constants.EnterpriseServer];
txtEnterpriseServerFQDN.Text = settings[Constants.EnterpriseServerFQDN];
ViewState["PWD"] = settings[Constants.Password]; ViewState["PWD"] = settings[Constants.Password];
txtUser.Text = settings[Constants.UserName]; txtUser.Text = settings[Constants.UserName];
} }
@ -52,6 +53,7 @@ namespace WebsitePanel.Portal.ProviderControls
{ {
settings[Constants.UtilityPath] = txtPath.Text; settings[Constants.UtilityPath] = txtPath.Text;
settings[Constants.EnterpriseServer] = txtEnterpriseServer.Text; settings[Constants.EnterpriseServer] = txtEnterpriseServer.Text;
settings[Constants.EnterpriseServerFQDN] = txtEnterpriseServerFQDN.Text;
settings[Constants.Password] = (txtPassword.Text.Length > 0) ? txtPassword.Text : (string)ViewState["PWD"]; settings[Constants.Password] = (txtPassword.Text.Length > 0) ? txtPassword.Text : (string)ViewState["PWD"];
settings[Constants.UserName] = txtUser.Text; settings[Constants.UserName] = txtUser.Text;
} }

View file

@ -1,7 +1,6 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3053
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@ -120,5 +119,32 @@ namespace WebsitePanel.Portal.ProviderControls {
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator3; protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator3;
/// <summary>
/// lblEnterpriseServerFQDN 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 lblEnterpriseServerFQDN;
/// <summary>
/// txtEnterpriseServerFQDN 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 txtEnterpriseServerFQDN;
/// <summary>
/// RequiredFieldValidator5 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.RequiredFieldValidator RequiredFieldValidator5;
} }
} }