From a79daf78f96ba4ba01708802e36afed9c30b2f0d Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Wed, 7 May 2014 13:33:41 +0300 Subject: [PATCH 01/45] fix bug with groups quota --- WebsitePanel/Database/update_db.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index eaf5b428..9c14d959 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -1670,11 +1670,11 @@ END GO --add SecurityGroupManagement Quota ---IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedSolution.SecurityGroupManagement') ---BEGIN ---INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (423, 13, 5, N'HostedSolution.SecurityGroupManagement', N'Allow Security Group Management', 1, 0, NULL, NULL) ---END ---GO +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedSolution.SecurityGroupManagement') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (423, 13, 5, N'HostedSolution.SecurityGroupManagement', N'Allow Security Group Management', 1, 0, NULL, NULL) +END +GO -- Lync Enterprise Voice From d4ecd7ba29701d14d974a18064750e211f6bb9ba Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Wed, 7 May 2014 14:57:14 +0300 Subject: [PATCH 02/45] fixed bug with groups quota. --- WebsitePanel/Database/update_db.sql | 40 ++++++++++++++++------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index 9c14d959..f5b6d176 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -1670,11 +1670,11 @@ END GO --add SecurityGroupManagement Quota -IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedSolution.SecurityGroupManagement') -BEGIN -INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (423, 13, 5, N'HostedSolution.SecurityGroupManagement', N'Allow Security Group Management', 1, 0, NULL, NULL) -END -GO +--IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedSolution.SecurityGroupManagement') +--BEGIN +--INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (423, 13, 5, N'HostedSolution.SecurityGroupManagement', N'Allow Security Group Management', 1, 0, NULL, NULL) +--END +--GO -- Lync Enterprise Voice @@ -3210,22 +3210,26 @@ GO IF EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedSolution.SecurityGroupManagement' AND [QuotaID] = 423) BEGIN + UPDATE [dbo].[Quotas] + SET [QuotaDescription] = N'Security Groups', + [QuotaName] = N'HostedSolution.SecurityGroups', + [QuotaTypeID] = 2 + WHERE [QuotaID] = 423 -UPDATE [dbo].[Quotas] -SET [QuotaDescription] = N'Security Groups', - [QuotaName] = N'HostedSolution.SecurityGroups', - [QuotaTypeID] = 2 -WHERE [QuotaID] = 423 - -UPDATE [dbo].[HostingPlanQuotas] -SET [QuotaValue] = -1 -WHERE [QuotaID] = 423 - -UPDATE [dbo].[PackageQuotas] -SET [QuotaValue] = -1 -WHERE [QuotaID] = 423 + UPDATE [dbo].[HostingPlanQuotas] + SET [QuotaValue] = -1 + WHERE [QuotaID] = 423 + UPDATE [dbo].[PackageQuotas] + SET [QuotaValue] = -1 + WHERE [QuotaID] = 423 END +ELSE + BEGIN + --add Security Groups Quota + IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedSolution.SecurityGroups') + INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (423, 13, 5, N'HostedSolution.SecurityGroups', N'Security Groups', 2, 0, NULL, NULL) + END GO IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetOrganizationStatistics') From eac561732f08040bc29a8688dd13704db5f444bb Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Thu, 8 May 2014 10:45:45 -0400 Subject: [PATCH 03/45] Added tag build-2.1.0.325 for changeset ba41c7bf73d3 From 95dfe66c7b38335e4842d20691bde03635259d55 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Fri, 16 May 2014 12:00:06 -0400 Subject: [PATCH 04/45] Added tag build-2.1.0.327 for changeset 0910046e8726 From 38d03fdf3547236631ba8dd21efb06de6b0e7f31 Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Thu, 22 May 2014 06:10:35 +0300 Subject: [PATCH 05/45] test Enterprise Storage Services issue small fix. --- .../Windows2012.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.EnterpriseStorage.Windows2012/Windows2012.cs b/WebsitePanel/Sources/WebsitePanel.Providers.EnterpriseStorage.Windows2012/Windows2012.cs index 04242ff4..bb9f43ab 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.EnterpriseStorage.Windows2012/Windows2012.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.EnterpriseStorage.Windows2012/Windows2012.cs @@ -344,7 +344,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage public override bool IsInstalled() { Server.Utils.OS.WindowsVersion version = WebsitePanel.Server.Utils.OS.GetVersion(); - return version == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2012; + return version == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2012 || + version == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2012R2; } protected WebDavSetting GetWebDavSetting(WebDavSetting setting) From 4b0e0b2e2ce4f0424a8f7aca42c8b0cc99fa39b4 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Thu, 22 May 2014 13:31:43 -0400 Subject: [PATCH 06/45] Added tag build-2.1.0.328 for changeset 1171b906586b From 83c7f45c11bb25f401d22d7c22f953f7d1646e54 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Thu, 22 May 2014 13:36:40 -0400 Subject: [PATCH 07/45] Added tag build-2.1.0.329 for changeset b1f79abcceef From a07c04a1873bfdf33cb99933de48ae59cb512a5e Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Fri, 23 May 2014 01:29:00 +0300 Subject: [PATCH 08/45] add Hosting Space Menu to Hosted Orgs module --- .../WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config index 7c5b9a14..95c6dc18 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config @@ -588,6 +588,9 @@ + + + From d02ddbe42f22b65f0bd8d39f09b5b3c948efaaa9 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Fri, 23 May 2014 12:49:08 -0400 Subject: [PATCH 09/45] Added tag build-2.1.0.330 for changeset 2840f578428f From fb64ac28f069d5949b2aff581e72655db9d655ca Mon Sep 17 00:00:00 2001 From: "a.skorina" Date: Mon, 26 May 2014 14:45:30 +0300 Subject: [PATCH 10/45] Scheduler > Max Execution time issue fix --- .../WebsitePanel.EnterpriseServer.Code/Tasks/TaskManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/TaskManager.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/TaskManager.cs index 4de147bd..31456752 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/TaskManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/TaskManager.cs @@ -412,7 +412,7 @@ namespace WebsitePanel.EnterpriseServer static void PurgeCompletedTasks(object obj) { - List tasks = TaskController.GetTasks(); + List tasks = TaskController.GetProcessTasks(BackgroundTaskStatus.Run); foreach (BackgroundTask task in tasks) { From 290f4f5c9267ca5c65d9da973f57449678420b92 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Tue, 27 May 2014 10:21:17 -0400 Subject: [PATCH 11/45] Added tag build-2.1.0.331 for changeset 648014301aa7 From 21fd23d836d8405b336fdfb0849110a32a769e9c Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Wed, 28 May 2014 19:55:59 -0400 Subject: [PATCH 12/45] Added tag build-2.1.0.332 for changeset 3cec1bfba078 From 441be7de9c53b0779e03256b3aaae1049c667918 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Mon, 2 Jun 2014 11:47:34 -0400 Subject: [PATCH 13/45] Added tag build-2.1.0.333 for changeset a7c469821313 From 8f1359cde4515e890f89bac4be19823503fa3082 Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Tue, 3 Jun 2014 02:21:06 +0300 Subject: [PATCH 14/45] added home icon to org home menu item. --- .../App_Themes/Default/Images/Exchange/home24.png | Bin 0 -> 589 bytes .../App_Themes/Default/Styles/Menus.css | 10 ++++++++++ .../WebsitePanel/OrganizationMenu.ascx.cs | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/Exchange/home24.png diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/Exchange/home24.png b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/Exchange/home24.png new file mode 100644 index 0000000000000000000000000000000000000000..3139668f2fa1721b89bfa63d199bee12ab870748 GIT binary patch literal 589 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM0wlfaz7_*1rX+877l!}s{b%+Ad7K3vkswhI zFm^kcZ3hx8D{xE)(qO#|6+TOsF)%PzdAc};Se(8(X`^>oqR6rO{j+o3mI_L&Wz}67 z5b6Amcjqf14*?;*hu0FW+z)6J$XFcGbs^xidZS0e(^}?sjpNG{xO7$qSnyu2{`+S4 zl&z)HzJJ(rzWCnrIiC;xm#@yc=zMR}{3GA5tzOescaH71!$n z&Hb7??M&@kTfPaFllFc(cP@|L>g}Sv4)afne%6^edv?wR-gz4zipVZqdimVuV@ExD zta|gpS`Yax-y@$}fdhKM6O0mZ^#VyK(i(eh%JhxkrQEH)J zz>@}>zS*qnbE}`{HHd97T77Qs!Szh1c1c;jpBUE{=5aJ@vFW_y8Vqmkmi{%bUum#t z<1W^kr^SsX`s+Le7zG7=pXy9pA^b*fTlJ5Cb82M*+m?OV=qj-N<);XaKPzs$uHodk zU+_PF?w{&EEW0=>)Lh=p*#nFc)e_f;l9a@fRIB8oR3OD*WMF8ZYha{nXc%H>WMyh# zWoV&mU}j}tu)KhCHHwDZ{FKbJN}vV + + + + + + + + + + @@ -655,26 +665,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Skins/Default/Browse1.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Skins/Default/Browse1.ascx index e88e64b9..8be359f9 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Skins/Default/Browse1.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Skins/Default/Browse1.ascx @@ -31,9 +31,11 @@ - +
- + + +
From db2aa7ca20f911111d7ee88fa9866a334f9b2d74 Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Wed, 4 Jun 2014 04:23:24 +0300 Subject: [PATCH 16/45] Menu slightly off and not clickable at times. Issue fixed. --- .../App_Themes/Default/Styles/Menus.css | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Menus.css b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Menus.css index c0361253..386c7bc4 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Menus.css +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Menus.css @@ -15,10 +15,15 @@ .TopMenu ul.AspNet-Menu ul ul { - top: -0.3em; + top: -1em; z-index: 502; } +.TopMenu ul.AspNet-Menu li ul li.AspNet-Menu-WithChildren +{ + cursor: pointer; +} + .TopMenu ul.AspNet-Menu li ul li.AspNet-Menu-WithChildren span { color: #000000 !important; @@ -76,7 +81,6 @@ .TopMenu ul.AspNet-Menu li span { - cursor: pointer; color: #ffffff; padding: 8px 25px 8px 15px; background: transparent url(../Images/menu_popup.gif) right center no-repeat; From 35fba3da19084618645712cbc0e86c1548dcbdd7 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Thu, 5 Jun 2014 09:28:20 -0400 Subject: [PATCH 17/45] Added tag build-2.1.0.334 for changeset 0a89ba241527 From 13c56d7de771d0175139053242cfd00cb91ddaf0 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 14:24:38 -0400 Subject: [PATCH 18/45] Blackberry 5 - Add Mapi Profile to Provider Settings --- .../Common/Constants.cs | 2 ++ .../BlackBerry5_Settings.ascx | 11 +++++-- .../BlackBerry5_Settings.ascx.cs | 2 ++ .../BlackBerry5_Settings.ascx.designer.cs | 31 +++++++++++++++++-- 4 files changed, 41 insertions(+), 5 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs index cf933303..49b591ab 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs @@ -66,6 +66,8 @@ namespace WebsitePanel.Providers.Common public const string UtilityPath = "UtilityPath"; + public const string MAPIProfile = "MAPIProfile"; + public const string EnterpriseServer = "EnterpriseServer"; public const string EnterpriseServerFQDN = "EnterpriseServerFQDN"; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx index 517212cc..927b8e5e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx @@ -8,14 +8,12 @@ - + - - @@ -39,5 +37,12 @@ + + + + + + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.cs index 2eb7ecbb..89f1f474 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.cs @@ -45,6 +45,7 @@ namespace WebsitePanel.Portal.ProviderControls txtPassword.Text = settings[Constants.Password]; txtEnterpriseServer.Text = settings[Constants.EnterpriseServer]; txtEnterpriseServerFQDN.Text = settings[Constants.EnterpriseServerFQDN]; + //txtMAPIProfile.Text = settings[Constants.MAPIProfile]; ViewState["PWD"] = settings[Constants.Password]; txtUser.Text = settings[Constants.UserName]; } @@ -56,6 +57,7 @@ namespace WebsitePanel.Portal.ProviderControls settings[Constants.EnterpriseServerFQDN] = txtEnterpriseServerFQDN.Text; settings[Constants.Password] = (txtPassword.Text.Length > 0) ? txtPassword.Text : (string)ViewState["PWD"]; settings[Constants.UserName] = txtUser.Text; + //settings[Constants.MAPIProfile] = txtMAPIProfile; } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.designer.cs index a17ad239..12c29236 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.designer.cs @@ -40,13 +40,13 @@ namespace WebsitePanel.Portal.ProviderControls { protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; /// - /// Label1 control. + /// lblUser control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label Label1; + protected global::System.Web.UI.WebControls.Label lblUser; /// /// txtUser control. @@ -146,5 +146,32 @@ namespace WebsitePanel.Portal.ProviderControls { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator5; + + /// + /// lblMAPIProfile control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblMAPIProfile; + + /// + /// txtMAPIProfile control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtMAPIProfile; + + /// + /// RequiredFieldValidator6 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator6; } } From 6c2a04e8fa9d6a6fcdf3fc78b6ae9887b2d0af81 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 14:42:37 -0400 Subject: [PATCH 19/45] Blackberry 5 - Second Commit - Add Mapi Profile to Provider Settings --- .../ProviderControls/BlackBerry5_Settings.ascx.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.cs index 89f1f474..ca40b4e0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.cs @@ -45,7 +45,7 @@ namespace WebsitePanel.Portal.ProviderControls txtPassword.Text = settings[Constants.Password]; txtEnterpriseServer.Text = settings[Constants.EnterpriseServer]; txtEnterpriseServerFQDN.Text = settings[Constants.EnterpriseServerFQDN]; - //txtMAPIProfile.Text = settings[Constants.MAPIProfile]; + txtMAPIProfile.Text = settings[Constants.MAPIProfile]; ViewState["PWD"] = settings[Constants.Password]; txtUser.Text = settings[Constants.UserName]; } @@ -57,7 +57,7 @@ namespace WebsitePanel.Portal.ProviderControls settings[Constants.EnterpriseServerFQDN] = txtEnterpriseServerFQDN.Text; settings[Constants.Password] = (txtPassword.Text.Length > 0) ? txtPassword.Text : (string)ViewState["PWD"]; settings[Constants.UserName] = txtUser.Text; - //settings[Constants.MAPIProfile] = txtMAPIProfile; + settings[Constants.MAPIProfile] = txtMAPIProfile.Text; } } } \ No newline at end of file From 1d87b86ef6d224927b27eb8210ea90d8ea2c731e Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 14:50:15 -0400 Subject: [PATCH 20/45] Added tag build-2.1.0.335 for changeset 661214069f98 From e43bfb2b1330feb03dabad7bcb70cdc52cd98b74 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 14:59:16 -0400 Subject: [PATCH 21/45] Blackberry 5 - Add HandheldCleanup Path to Provider Settings --- .../Common/Constants.cs | 2 ++ .../BlackBerry5_Settings.ascx.resx | 6 +++++ .../BlackBerry5_Settings.ascx | 7 +++++ .../BlackBerry5_Settings.ascx.cs | 2 ++ .../BlackBerry5_Settings.ascx.designer.cs | 27 +++++++++++++++++++ 5 files changed, 44 insertions(+) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs index 49b591ab..4521e180 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs @@ -66,6 +66,8 @@ namespace WebsitePanel.Providers.Common public const string UtilityPath = "UtilityPath"; + public const string HandheldcleanupPath = "HandheldcleanupPath"; + public const string MAPIProfile = "MAPIProfile"; public const string EnterpriseServer = "EnterpriseServer"; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/BlackBerry5_Settings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/BlackBerry5_Settings.ascx.resx index c488c21d..53e4e1e2 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/BlackBerry5_Settings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/BlackBerry5_Settings.ascx.resx @@ -123,6 +123,12 @@ BlackBerry Enterprise Server FQDN: + + handheldcleanup.exe utility Path: + + + BlackBerry MAPI Profile: + Authentication password: diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx index 927b8e5e..52416d61 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx @@ -6,6 +6,13 @@ + + + + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.cs index ca40b4e0..b88abed0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.cs @@ -42,6 +42,7 @@ namespace WebsitePanel.Portal.ProviderControls public void BindSettings(StringDictionary settings) { txtPath.Text = settings[Constants.UtilityPath]; + txtHandheldcleanupPath.Text = settings[Constants.HandheldcleanupPath]; txtPassword.Text = settings[Constants.Password]; txtEnterpriseServer.Text = settings[Constants.EnterpriseServer]; txtEnterpriseServerFQDN.Text = settings[Constants.EnterpriseServerFQDN]; @@ -53,6 +54,7 @@ namespace WebsitePanel.Portal.ProviderControls public void SaveSettings(StringDictionary settings) { settings[Constants.UtilityPath] = txtPath.Text; + settings[Constants.HandheldcleanupPath] = txtHandheldcleanupPath.Text; settings[Constants.EnterpriseServer] = txtEnterpriseServer.Text; settings[Constants.EnterpriseServerFQDN] = txtEnterpriseServerFQDN.Text; settings[Constants.Password] = (txtPassword.Text.Length > 0) ? txtPassword.Text : (string)ViewState["PWD"]; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.designer.cs index 12c29236..fcdef004 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.designer.cs @@ -39,6 +39,33 @@ namespace WebsitePanel.Portal.ProviderControls { /// protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; + /// + /// lblHandheldcleanupPath control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblHandheldcleanupPath; + + /// + /// txtHandheldcleanupPath control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtHandheldcleanupPath; + + /// + /// RequiredFieldValidator7 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator7; + /// /// lblUser control. /// From 6a72dddb2fdcfee867ece4986a29fc5b0f125054 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 15:08:09 -0400 Subject: [PATCH 22/45] Added tag build-2.1.0.336 for changeset 68f4d2e40fba From c22a9122ec929090ed30f9c6b42e679cd4023df9 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 15:39:58 -0400 Subject: [PATCH 23/45] Blackberry 5 - run handheldcleanup after user creation if path exists in provider settings --- .../BlackBerry5Provider.cs | 55 ++++++++++++++++++- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs index 961d6c7f..d27ba27d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs @@ -47,6 +47,20 @@ namespace WebsitePanel.Providers.HostedSolution return ProviderSettings[Constants.UserName]; } } + public string HandheldcleanupPath + { + get + { + return ProviderSettings[Constants.HandheldcleanupPath]; + } + } + public string MAPIProfile + { + get + { + return ProviderSettings[Constants.MAPIProfile]; + } + } public override string[] Install() { @@ -65,7 +79,9 @@ namespace WebsitePanel.Providers.HostedSolution ResultObject res = HostedSolutionLog.StartLog("CreateBlackBerryUser5Internal"); string file = Path.Combine(UtilityPath, "besuseradminclient.exe"); + string file2 = Path.Combine(HandheldcleanupPath, "handheldcleanup.exe"); + //Add user to Blackberry Server if (!File.Exists(file)) { HostedSolutionLog.EndLog("CreateBlackBerry5UserInternal", res, BlackBerryErrorsCodes.FILE_PATH_IS_INVALID); @@ -79,10 +95,12 @@ namespace WebsitePanel.Providers.HostedSolution EnterpriseServer, EnterpriseServerFQDN); - try + //run besuseradminclient.exe + + try { string output; - + int exitCode = Execute(file, arguments, out output); if (exitCode == 0) { @@ -93,15 +111,46 @@ namespace WebsitePanel.Providers.HostedSolution { throw new ApplicationException( - string.Format("Excit code is not 0. {0}, ExitCode = {1}", output, exitCode)); + string.Format("Exit code is not 0. {0}, ExitCode = {1}", output, exitCode)); } } + catch (Exception ex) { HostedSolutionLog.EndLog("CreateBlackBerry5UserInternal", res, BlackBerryErrorsCodes.CANNOT_EXECUTE_COMMAND, ex); return res; } + //run handheldcleanup.exe + if (File.Exists(file2)) + { + string arguments2 = string.Format("-u -p {0} {1}", + MAPIProfile, + "< servername.txt"); + try + { + string output; + + int exitCode = Execute(file, arguments, out output); + if (exitCode == 0) + { + Log.WriteInfo(output); + + } + else + { + + throw new ApplicationException( + string.Format("Exit code is not 0. {0}, ExitCode = {1}", output, exitCode)); + } + } + + catch (Exception ex) + { + HostedSolutionLog.EndLog("CreateBlackBerry5UserInternal", res, BlackBerryErrorsCodes.CANNOT_EXECUTE_COMMAND, ex); + return res; + } + } HostedSolutionLog.EndLog("CreateBlackBerry5UserInternal"); return res; From f5a9ee3ea1978cb76a488f6b0361639798ab82c7 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 15:47:16 -0400 Subject: [PATCH 24/45] Added tag build-2.1.0.337 for changeset 7665232662ef From 41eb70906bde60745219203f6187c51458b3a398 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 16:07:47 -0400 Subject: [PATCH 25/45] Add Better Error for HandheldCleanup --- .../HostedSolution/BlackBerryErrorsCodes.cs | 2 ++ .../BlackBerry5Provider.cs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryErrorsCodes.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryErrorsCodes.cs index cfdd0bef..3d6347a1 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryErrorsCodes.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryErrorsCodes.cs @@ -42,6 +42,8 @@ public const string CANNOT_EXECUTE_COMMAND = "CANNOT_EXECUTE_COMMAND"; + public const string CANNOT_EXECUTE_COMMAND_HANDHELDCLEANUP = "CANNOT_EXECUTE_COMMAND_HANDHELDCLEANUP"; + public const string CANNOT_GET_BLACKBERRY_PROXY = "CANNOT_GET_BLACKBERRY_PROXY"; public const string CANNOT_ADD_BLACKBERRY_USER = "CANNOT_ADD_BLACKBERRY_USER"; diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs index d27ba27d..52d5cc3d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs @@ -124,7 +124,7 @@ namespace WebsitePanel.Providers.HostedSolution //run handheldcleanup.exe if (File.Exists(file2)) { - string arguments2 = string.Format("-u -p {0} {1}", + string arguments2 = string.Format("-u -p {0} {1} ", MAPIProfile, "< servername.txt"); try @@ -147,7 +147,7 @@ namespace WebsitePanel.Providers.HostedSolution catch (Exception ex) { - HostedSolutionLog.EndLog("CreateBlackBerry5UserInternal", res, BlackBerryErrorsCodes.CANNOT_EXECUTE_COMMAND, ex); + HostedSolutionLog.EndLog("CreateBlackBerry5UserInternal", res, BlackBerryErrorsCodes.CANNOT_EXECUTE_COMMAND_HANDHELDCLEANUP, ex); return res; } } From f799ad522fec469dbbac16a529c88e6a5516c2c7 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 16:09:24 -0400 Subject: [PATCH 26/45] Make change --- .../BlackBerry5Provider.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs index 52d5cc3d..3240d243 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs @@ -124,9 +124,9 @@ namespace WebsitePanel.Providers.HostedSolution //run handheldcleanup.exe if (File.Exists(file2)) { - string arguments2 = string.Format("-u -p {0} {1} ", + string arguments2 = string.Format("-u -p {0} {1}", MAPIProfile, - "< servername.txt"); + " < servername.txt"); try { string output; From 3ff28dd819f70bdbe9f6ebcda829036598e3cc9a Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 16:15:19 -0400 Subject: [PATCH 27/45] Added tag build-2.1.0.338 for changeset 0ac6ae8052c4 From 71b365bf8e8dd01771a1e241feac452c7384d48e Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 16:24:35 -0400 Subject: [PATCH 28/45] Blackberry 5 - Update Arguments --- .../BlackBerry5Provider.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs index 3240d243..52594bbf 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs @@ -124,6 +124,7 @@ namespace WebsitePanel.Providers.HostedSolution //run handheldcleanup.exe if (File.Exists(file2)) { + string arguments2 = string.Format("-u -p {0} {1}", MAPIProfile, " < servername.txt"); @@ -131,7 +132,7 @@ namespace WebsitePanel.Providers.HostedSolution { string output; - int exitCode = Execute(file, arguments, out output); + int exitCode = Execute(file, arguments2, out output); if (exitCode == 0) { Log.WriteInfo(output); From 333d3b1bfa51dbaf36ed41f3d6fd0597a501e8ef Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 16:31:29 -0400 Subject: [PATCH 29/45] Added tag build-2.1.0.339 for changeset d6541d1a4cd2 From 77d3ab338d6b577c0ea5028d3140d76f324243f2 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 16:47:58 -0400 Subject: [PATCH 30/45] Further Update --- .../BlackBerry5Provider.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs index 52594bbf..57f23a54 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs @@ -124,10 +124,8 @@ namespace WebsitePanel.Providers.HostedSolution //run handheldcleanup.exe if (File.Exists(file2)) { - - string arguments2 = string.Format("-u -p {0} {1}", - MAPIProfile, - " < servername.txt"); + string arguments2 = string.Format("-u -p {0} < servername.txt", + MAPIProfile); try { string output; From 9c8aacf4831fdfc76177006f97b64c7ad5cbd629 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 16:51:44 -0400 Subject: [PATCH 31/45] Added tag build-2.1.0.340 for changeset a6598f5452c9 From 978141ce6721c139c4ea3c16fdb427fd19f03d5c Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 16:54:16 -0400 Subject: [PATCH 32/45] Backberry 5 - Update executed file for handheldcleanup --- .../BlackBerry5Provider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs index 57f23a54..43b2f7e1 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs @@ -130,7 +130,7 @@ namespace WebsitePanel.Providers.HostedSolution { string output; - int exitCode = Execute(file, arguments2, out output); + int exitCode = Execute(file2, arguments2, out output); if (exitCode == 0) { Log.WriteInfo(output); From 971937d94928b065603a5bba5c17377d563594a9 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 16:57:59 -0400 Subject: [PATCH 33/45] Added tag build-2.1.0.341 for changeset 2fa5102c4cf9 From 74239a5e8244c1a2a459ab37088198a053afb3b9 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 17:08:19 -0400 Subject: [PATCH 34/45] Try something new to specify servername.txt --- .../BlackBerry5Provider.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs index 43b2f7e1..22614732 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs @@ -124,8 +124,11 @@ namespace WebsitePanel.Providers.HostedSolution //run handheldcleanup.exe if (File.Exists(file2)) { - string arguments2 = string.Format("-u -p {0} < servername.txt", - MAPIProfile); + string serverfilename = Path.Combine(HandheldcleanupPath, "servername.txt"); + + string arguments2 = string.Format("-u -p {0} < {1}", + MAPIProfile, + serverfilename); try { string output; From 87c4b678667eaca22cc370df721e4edb48e25d0b Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 17:15:39 -0400 Subject: [PATCH 35/45] Added tag build-2.1.0.342 for changeset 78a4a43328dc From 33c6110d191b7b4d518e487f841d1c4dc7918268 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 17:34:55 -0400 Subject: [PATCH 36/45] Merge --- .../BlackBerry5Provider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs index 22614732..667e7dc3 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs @@ -143,7 +143,7 @@ namespace WebsitePanel.Providers.HostedSolution { throw new ApplicationException( - string.Format("Exit code is not 0. {0}, ExitCode = {1}", output, exitCode)); + string.Format("Exit code is not 0. {0}, ExitCode = {1}", arguments2, output, exitCode)); } } From 0ab2eb287aac7d6e62feb9d9a0d8296ad088528f Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 17:40:45 -0400 Subject: [PATCH 37/45] Added tag build-2.1.0.343 for changeset f8910b257ccd From 2f2b58e130194b2e42ef9f2b13d1fa164fa4d48b Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 17:44:26 -0400 Subject: [PATCH 38/45] Add Execute Commands for HandheldCleanup --- .../BlackBerry5Provider.cs | 18 +----- .../BlackBerryProvider.cs | 56 ++++++++++++++++++- 2 files changed, 57 insertions(+), 17 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs index 667e7dc3..4e0b947f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs @@ -47,20 +47,6 @@ namespace WebsitePanel.Providers.HostedSolution return ProviderSettings[Constants.UserName]; } } - public string HandheldcleanupPath - { - get - { - return ProviderSettings[Constants.HandheldcleanupPath]; - } - } - public string MAPIProfile - { - get - { - return ProviderSettings[Constants.MAPIProfile]; - } - } public override string[] Install() { @@ -124,7 +110,7 @@ namespace WebsitePanel.Providers.HostedSolution //run handheldcleanup.exe if (File.Exists(file2)) { - string serverfilename = Path.Combine(HandheldcleanupPath, "servername.txt"); + string serverfilename = "servername.txt"; string arguments2 = string.Format("-u -p {0} < {1}", MAPIProfile, @@ -133,7 +119,7 @@ namespace WebsitePanel.Providers.HostedSolution { string output; - int exitCode = Execute(file2, arguments2, out output); + int exitCode = Execute2(file2, arguments2, out output); if (exitCode == 0) { Log.WriteInfo(output); diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs index 44ba70f4..cc0d37d9 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs @@ -50,7 +50,20 @@ namespace WebsitePanel.Providers.HostedSolution return ProviderSettings[Constants.UtilityPath]; } } - + public string HandheldcleanupPath + { + get + { + return ProviderSettings[Constants.HandheldcleanupPath]; + } + } + public string MAPIProfile + { + get + { + return ProviderSettings[Constants.MAPIProfile]; + } + } public string Password { get @@ -172,6 +185,47 @@ namespace WebsitePanel.Providers.HostedSolution return res; } + protected int Execute2(string file, string arguments, out string output, out string error) + { + string oldDir = Directory.GetCurrentDirectory(); + Directory.SetCurrentDirectory(HandheldcleanupPath); + ProcessStartInfo startInfo = new ProcessStartInfo(file, arguments); + + startInfo.RedirectStandardError = true; + startInfo.RedirectStandardOutput = true; + startInfo.UseShellExecute = false; + startInfo.CreateNoWindow = true; + startInfo.WindowStyle = ProcessWindowStyle.Hidden; + + Process proc = Process.Start(startInfo); + + if (proc == null) + throw new ApplicationException("Proc is null."); + + StreamReader outputReader = proc.StandardOutput; + output = outputReader.ReadToEnd(); + + StreamReader errorReader = proc.StandardError; + error = errorReader.ReadToEnd(); + + Directory.SetCurrentDirectory(oldDir); + return proc.ExitCode; + } + + protected int Execute2(string file, string arguments, out string output) + { + Log.WriteInfo(file); + Log.WriteInfo(arguments); + + string outputData; + string errorData; + int res = Execute2(file, arguments, out outputData, out errorData); + + output = outputData.Length > 0 ? "Output stream:" + outputData : string.Empty; + output += errorData.Length > 0 ? "Error stream:" + errorData : string.Empty; + + return res; + } public ResultObject DeleteBlackBerryUser(string primaryEmailAddress) { From 33c77d07ab6fd8080aa187f11176493a8a7472f4 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 17:51:10 -0400 Subject: [PATCH 39/45] Added tag build-2.1.0.344 for changeset 1059cd750ab9 From 3d0fd1781bccf98725b2d0115ef78d5b6bb8344b Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 18:08:15 -0400 Subject: [PATCH 40/45] Try to execute as shell window --- .../WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs index cc0d37d9..e24e62cb 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs @@ -193,7 +193,7 @@ namespace WebsitePanel.Providers.HostedSolution startInfo.RedirectStandardError = true; startInfo.RedirectStandardOutput = true; - startInfo.UseShellExecute = false; + startInfo.UseShellExecute = true; startInfo.CreateNoWindow = true; startInfo.WindowStyle = ProcessWindowStyle.Hidden; From 6ac1508fcb9b304fbd40d2e671f0200b07b39c3c Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 18:14:47 -0400 Subject: [PATCH 41/45] Added tag build-2.1.0.345 for changeset 937b7ded45af From d4d3548f633e09ac8c6514a47f5c2b58cda42aa7 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 18:29:01 -0400 Subject: [PATCH 42/45] Modify Execute2 --- .../BlackBerry5Provider.cs | 6 ++---- .../BlackBerryProvider.cs | 8 +++++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs index 4e0b947f..cdd47dad 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs @@ -110,11 +110,9 @@ namespace WebsitePanel.Providers.HostedSolution //run handheldcleanup.exe if (File.Exists(file2)) { - string serverfilename = "servername.txt"; - string arguments2 = string.Format("-u -p {0} < {1}", - MAPIProfile, - serverfilename); + string arguments2 = string.Format("-u -p {0}", + MAPIProfile); try { string output; diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs index e24e62cb..5bf79df6 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs @@ -193,12 +193,18 @@ namespace WebsitePanel.Providers.HostedSolution startInfo.RedirectStandardError = true; startInfo.RedirectStandardOutput = true; - startInfo.UseShellExecute = true; + startInfo.RedirectStandardInput = true; + startInfo.UseShellExecute = false; startInfo.CreateNoWindow = true; startInfo.WindowStyle = ProcessWindowStyle.Hidden; Process proc = Process.Start(startInfo); + StreamWriter inputWriter = proc.StandardInput; + inputWriter.Write(EnterpriseServer); + inputWriter.Flush(); + inputWriter.Close(); + if (proc == null) throw new ApplicationException("Proc is null."); From d4bcb47012c7322de5f21fb29028a526773d70e1 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 18:35:33 -0400 Subject: [PATCH 43/45] Added tag build-2.1.0.346 for changeset b4a831d786de From 56b69677d122665f0948ec6288325d4aef485e22 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 18:52:20 -0400 Subject: [PATCH 44/45] Further Modify Execute2 --- .../BlackBerryProvider.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs index 5bf79df6..49ba3eba 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs @@ -191,17 +191,17 @@ namespace WebsitePanel.Providers.HostedSolution Directory.SetCurrentDirectory(HandheldcleanupPath); ProcessStartInfo startInfo = new ProcessStartInfo(file, arguments); + startInfo.UseShellExecute = false; startInfo.RedirectStandardError = true; startInfo.RedirectStandardOutput = true; startInfo.RedirectStandardInput = true; - startInfo.UseShellExecute = false; startInfo.CreateNoWindow = true; startInfo.WindowStyle = ProcessWindowStyle.Hidden; Process proc = Process.Start(startInfo); StreamWriter inputWriter = proc.StandardInput; - inputWriter.Write(EnterpriseServer); + inputWriter.WriteLine(EnterpriseServer); inputWriter.Flush(); inputWriter.Close(); From ff5065f539374b0d91779bec6d8e78f9eacf864b Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 8 Jun 2014 18:58:21 -0400 Subject: [PATCH 45/45] Added tag build-2.1.0.347 for changeset 1dec2f6d1d70