From 18275371c0aaed1fd6f527cd2a477c06caabd0e0 Mon Sep 17 00:00:00 2001 From: Olov Karlsson Date: Fri, 14 Nov 2014 08:59:47 +0100 Subject: [PATCH 01/42] Now it is possible to use MSFTP70 to create a FTP site --- .../ProviderControls/MSFTP70_Settings.ascx.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/MSFTP70_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/MSFTP70_Settings.ascx.cs index 3c4767a5..94206b77 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/MSFTP70_Settings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/MSFTP70_Settings.ascx.cs @@ -121,7 +121,14 @@ namespace WebsitePanel.Portal.ProviderControls ddlSite.Items.Add(item); } - ddlSite_SelectedIndexChanged(this, null); + if (ddlSite.Items.Count == 0) + { + ddlSite.Items.Add(new ListItem("Default FTP Site (not yet created)", "Default FTP Site")); + } + else + { + ddlSite_SelectedIndexChanged(this, null); + } } protected void ddlSite_SelectedIndexChanged(object sender, EventArgs e) From 8da8bec9260e0efb04c24ec300ea43571956c528 Mon Sep 17 00:00:00 2001 From: Olov Karlsson Date: Fri, 14 Nov 2014 09:06:24 +0100 Subject: [PATCH 02/42] Fixed error regarding phppath in update_db.sql --- WebsitePanel/Database/update_db.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index d3669869..355e1325 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -6074,11 +6074,11 @@ GO -- wsp-10269: Changed php extension path in default properties for IIS70 and IIS80 provider update ServiceDefaultProperties -set PhpPath='%PROGRAMFILES(x86)%\PHP\php-cgi.exe' -where ProviderId in(101, 105) +set PropertyValue='%PROGRAMFILES(x86)%\PHP\php-cgi.exe' +where PropertyName='PhpPath' and ProviderId in(101, 105) update ServiceDefaultProperties -set Php4Path='%PROGRAMFILES(x86)%\PHP\ph.exe' -where ProviderId in(101, 105) +set PropertyValue='%PROGRAMFILES(x86)%\PHP\php.exe' +where PropertyName='Php4Path' and ProviderId in(101, 105) GO From 5e596f321097c466351c9ba922e3da4fc5978011 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Fri, 14 Nov 2014 06:47:32 -0500 Subject: [PATCH 03/42] Added tag build-2.1.0.464 for changeset 59793778aa1e From ed48dd68c4bfa1a80f50513880e0c68b39b47a1a Mon Sep 17 00:00:00 2001 From: Olov Karlsson Date: Fri, 14 Nov 2014 20:04:23 +0100 Subject: [PATCH 04/42] UI-fixes for IceWarp Server and Account settings --- .../IceWarp_Settings.ascx.resx | 15 +++++++++++++ .../ProviderControls/IceWarp_EditAccount.ascx | 2 +- .../IceWarp_EditAccount.ascx.cs | 7 +++++-- .../ProviderControls/IceWarp_Settings.ascx | 21 ++++++++++++------- .../IceWarp_Settings.ascx.designer.cs | 17 +++++++++++---- 5 files changed, 47 insertions(+), 15 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/IceWarp_Settings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/IceWarp_Settings.ascx.resx index 9b5d5338..465f32a9 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/IceWarp_Settings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/IceWarp_Settings.ascx.resx @@ -123,16 +123,31 @@ + + Global max message size: + + + Public IP Address: + Public IP Address: + + 0 means unlimited + + + Can be overridden on domain level if you check 'Override global limits' + + + Must be a value between 0 and 99, 0 means disabled + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IceWarp_EditAccount.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IceWarp_EditAccount.ascx index aeae00bc..fd2050e6 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IceWarp_EditAccount.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IceWarp_EditAccount.ascx @@ -76,7 +76,7 @@ - + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IceWarp_EditAccount.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IceWarp_EditAccount.ascx.cs index f047b103..a7dfa4ab 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IceWarp_EditAccount.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IceWarp_EditAccount.ascx.cs @@ -37,8 +37,11 @@ namespace WebsitePanel.Portal.ProviderControls { // Hide some form items when creating a new account passwordRow.Visible = (PanelRequest.ItemID > 0); + AutoresponderPanel.Visible = (PanelRequest.ItemID > 0); secAutoresponder.Visible = (PanelRequest.ItemID > 0); + ForwardingPanel.Visible = (PanelRequest.ItemID > 0); secForwarding.Visible = (PanelRequest.ItemID > 0); + OlderMailsPanel.Visible = (PanelRequest.ItemID > 0); secOlderMails.Visible = (PanelRequest.ItemID > 0); } @@ -109,10 +112,10 @@ namespace WebsitePanel.Portal.ProviderControls item.IsDomainAdmin = cbDomainAdmin.Checked; item.DeleteOlder = cbDeleteOlder.Checked; - item.DeleteOlderDays = Convert.ToInt32(txtDeleteOlderDays.Text); + item.DeleteOlderDays = string.IsNullOrWhiteSpace(txtDeleteOlderDays.Text) ? 0 : Convert.ToInt32(txtDeleteOlderDays.Text); item.ForwardOlder = cbForwardOlder.Checked; - item.ForwardOlderDays = Convert.ToInt32(txtForwardOlderDays.Text); + item.ForwardOlderDays = string.IsNullOrWhiteSpace(txtForwardOlderDays.Text) ? 0 : Convert.ToInt32(txtForwardOlderDays.Text); item.ForwardOlderTo = txtForwardOlderTo.Text; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IceWarp_Settings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IceWarp_Settings.ascx index d603cc96..0645454c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IceWarp_Settings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IceWarp_Settings.ascx @@ -1,6 +1,6 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="IceWarp_Settings.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.IceWarp_Settings" %> <%@ Register Src="../UserControls/SelectIPAddress.ascx" TagName="SelectIPAddress" TagPrefix="uc1" %> - +
+ + + + @@ -53,9 +58,9 @@
@@ -14,9 +14,14 @@ - - + + +
@@ -43,9 +48,9 @@ - + - +
- - - + + +
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IceWarp_Settings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IceWarp_Settings.ascx.designer.cs index 7348a746..04a643f7 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IceWarp_Settings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IceWarp_Settings.ascx.designer.cs @@ -49,13 +49,22 @@ namespace WebsitePanel.Portal.ProviderControls { protected global::System.Web.UI.WebControls.TextBox txtMaxMessageSizeInMB; /// - /// Label1 control. + /// txtMaxMessageSizeInMBRequired 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.RequiredFieldValidator txtMaxMessageSizeInMBRequired; + + /// + /// MaxMessageSizeInMB control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label MaxMessageSizeInMB; /// /// cbUseDomainDiskQuota control. @@ -130,12 +139,12 @@ namespace WebsitePanel.Portal.ProviderControls { protected global::System.Web.UI.WebControls.TextBox txtWarnMailboxUsage; /// - /// RequiredFieldValidator1 control. + /// txtWarnMailboxUsageRequired control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; + protected global::System.Web.UI.WebControls.RequiredFieldValidator txtWarnMailboxUsageRequired; } } From 36206b74ad9fe9cef6335925daa957f0f6f70d51 Mon Sep 17 00:00:00 2001 From: Olov Karlsson Date: Fri, 14 Nov 2014 20:06:57 +0100 Subject: [PATCH 05/42] Larger width on UserControls DomainSelectDomainControl and SelectIPAddress --- .../WebsitePanel/DomainsSelectDomainControl.ascx | 2 +- .../DomainsSelectDomainControl.ascx.designer.cs | 3 +-- .../WebsitePanel/UserControls/SelectIPAddress.ascx | 2 +- .../UserControls/SelectIPAddress.ascx.designer.cs | 14 +++++++++++--- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsSelectDomainControl.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsSelectDomainControl.ascx index e37eb045..27d78949 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsSelectDomainControl.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsSelectDomainControl.ascx @@ -1,4 +1,4 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DomainsSelectDomainControl.ascx.cs" Inherits="WebsitePanel.Portal.DomainsSelectDomainControl" %> - + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsSelectDomainControl.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsSelectDomainControl.ascx.designer.cs index 08309915..40c4eebf 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsSelectDomainControl.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsSelectDomainControl.ascx.designer.cs @@ -1,10 +1,9 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3074 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SelectIPAddress.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SelectIPAddress.ascx index 795fdacc..fc10570b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SelectIPAddress.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SelectIPAddress.ascx @@ -1,3 +1,3 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SelectIPAddress.ascx.cs" Inherits="WebsitePanel.Portal.SelectIPAddress" %> - + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SelectIPAddress.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SelectIPAddress.ascx.designer.cs index df23d710..7e5f87fa 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SelectIPAddress.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/SelectIPAddress.ascx.designer.cs @@ -1,16 +1,24 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.42 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ namespace WebsitePanel.Portal { + public partial class SelectIPAddress { - protected System.Web.UI.WebControls.DropDownList ddlIPAddresses; + + /// + /// ddlIPAddresses control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlIPAddresses; } } From ac115e209fd8abb45585a80a6fe50b4236e48eae Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Fri, 14 Nov 2014 14:36:38 -0500 Subject: [PATCH 06/42] Added tag build-2.1.0.465 for changeset 7e5a44503357 From 58cc51217bb44863891ffe192a98b072f723fa59 Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Mon, 17 Nov 2014 23:38:49 +0300 Subject: [PATCH 07/42] exchange 2013: fix public folder permission --- .../Exchange2013.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs index fa411b12..f318fe29 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs @@ -4790,6 +4790,10 @@ namespace WebsitePanel.Providers.HostedSolution } CheckOrganizationRootPublicFolderPermission(runSpace, organizationId); + + // exchange transport needs access to create new items in order to deliver email + AddPublicFolderClientPermission(runSpace, folder, "Anonymous", "CreateItems"); + } finally { From 3881892ce90b9888197149af5871a6ad3f2936e8 Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Tue, 18 Nov 2014 00:21:43 +0300 Subject: [PATCH 08/42] wsp-10268 Text doesn't fit on Add domain page --- .../WebsitePanel.WebPortal/App_Themes/Default/Styles/Skin.css | 3 ++- .../DesktopModules/WebsitePanel/WebSitesAddSite.ascx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Skin.css b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Skin.css index 648d27e7..05b59c1b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Skin.css +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Skin.css @@ -289,4 +289,5 @@ UL.ActionButtons LI {margin-bottom: 12px;} .enabled {width:20px; height:20px; background: transparent url(../Icons/ok.png) left center no-repeat; border:medium none;} p.warningText {font-size:14px; color:Red; text-align:center;} .Hidden {display: none;} -.LinkText {color:#428bca;} \ No newline at end of file +.LinkText {color:#428bca;} +.WrapText { white-space: normal;} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesAddSite.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesAddSite.ascx index 7c973b98..1b29c6af 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesAddSite.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesAddSite.ascx @@ -28,7 +28,7 @@ -
+
From 9368aacbce5132db60dbf0bc7e4b4ced16cce8f9 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Mon, 17 Nov 2014 18:30:54 -0500 Subject: [PATCH 09/42] Added tag build-2.1.0.466 for changeset 8d8f9b7cc2cc From 6df229181cad7c60a5338eebce7bdfc1af6e6ebd Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Tue, 18 Nov 2014 03:08:01 +0300 Subject: [PATCH 10/42] wsp-10265 v 2.1 : formatting issue on server error output --- .../App_Themes/Default/Styles/Skin.css | 1 + .../WebsitePanel/UserControls/MessageBox.ascx | 6 ++-- .../UserControls/MessageBox.ascx.designer.cs | 32 +++++++++++++++++-- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Skin.css b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Skin.css index 05b59c1b..e220d489 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Skin.css +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Skin.css @@ -235,6 +235,7 @@ A.Black {color: Black !important; text-decoration: none !important;} .RedStatus {background-image: url(error_bkg.gif); background-repeat: repeat-x;font-size: 8pt; font-weight: bold; color: White; background-color: #ff3300; text-align: center; padding: 6px;} .MessageBox SPAN.description {font-weight: normal !important;} .MessageBox .TechnicalDetails {padding-top: 4px; font-weight: normal !important;} +.TechnicalDetailsTable {background-color: #FFFFFF; color: #222; } .MessageBoxSection {font-size: 8pt; font-weight: bold;} .popupHint {border: 2px solid #C4D6BB;padding: 3px; background-color: #F1F1FF;} .popupComments {border: 2px solid #C4D6BB;font-size: 9px; padding: 3px; background-color: #F1F1FF;} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MessageBox.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MessageBox.ascx index 4624e791..c202118b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MessageBox.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MessageBox.ascx @@ -11,7 +11,7 @@ TargetControlID="TechnicalDetailsPanel" resourcekey="secTechnicalDetails" Text="Technical Details"> - +
- - - - + + + +
@@ -51,7 +51,7 @@ - @@ -103,7 +103,7 @@ diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MessageBox.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MessageBox.ascx.designer.cs index dd7712f7..87e5ed3e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MessageBox.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/MessageBox.ascx.designer.cs @@ -1,10 +1,38 @@ +// Copyright (c) 2014, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3074 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ From bfca727dfbdf687840e516e3fb6cd8e11c71ad93 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Mon, 17 Nov 2014 19:34:05 -0500 Subject: [PATCH 11/42] Added tag build-2.1.0.467 for changeset e50c53b54634 From 5d2a9348675758137839c5339b6b0dd9f5ddfa9a Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Tue, 18 Nov 2014 03:52:11 -0800 Subject: [PATCH 12/42] Policy naming changed --- .../RemoteDesktopServicesController.cs | 12 +- .../IRemoteDesktopServices.cs | 4 +- .../Windows2012.cs | 53 +- .../RemoteDesktopServicesProxy.cs | 1229 +++++++---------- .../RemoteDesktopServices.asmx.cs | 8 +- 5 files changed, 561 insertions(+), 745 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs index f2a3ca42..5f72aec1 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs @@ -252,7 +252,11 @@ namespace WebsitePanel.EnterpriseServer var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); - rds.CreateCollection(org.OrganizationId, collection); + var package = PackageController.GetPackage(org.PackageId); + + var tenant = UserController.GetUser(package.UserId); + + rds.CreateCollection(org.OrganizationId, tenant.Username, collection); collection.Id = DataProvider.AddRDSCollection(itemId, collection.Name, collection.Description); @@ -320,7 +324,11 @@ namespace WebsitePanel.EnterpriseServer var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); - rds.RemoveCollection(org.OrganizationId, collection.Name); + var package = PackageController.GetPackage(org.PackageId); + + var tenant = UserController.GetUser(package.UserId); + + rds.RemoveCollection(org.OrganizationId, tenant.Username, collection.Name); DataProvider.DeleteRDSCollection(collection.Id); } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs index 6cf5ec6b..ca7fabd3 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs @@ -39,9 +39,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices /// public interface IRemoteDesktopServices { - bool CreateCollection(string organizationId, RdsCollection collection); + bool CreateCollection(string organizationId, string tenantName, RdsCollection collection); RdsCollection GetCollection(string collectionName); - bool RemoveCollection(string organizationId, string collectionName); + bool RemoveCollection(string organizationId, string tenantName, string collectionName); bool SetUsersInCollection(string organizationId, string collectionName, List users); void AddSessionHostServerToCollection(string organizationId, string collectionName, RdsServer server); void AddSessionHostServersToCollection(string organizationId, string collectionName, List servers); diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs b/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs index 934b2239..a3563eb4 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs @@ -139,7 +139,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices #region RDS Collections - public bool CreateCollection(string organizationId, RdsCollection collection) + public bool CreateCollection(string organizationId, string tenantName, RdsCollection collection) { var result = true; @@ -194,19 +194,21 @@ namespace WebsitePanel.Providers.RemoteDesktopServices ActiveDirectoryUtils.CreateGroup(orgPath, GetUsersGroupName(collection.Name)); } + var policyName = GetPolicyName(tenantName, organizationId, collection.Name); + foreach (var gateway in Gateways) { if (!CentralNps) { - CreateRdCapForce(runSpace, gateway, collection.Name, new List { GetUsersGroupName(collection.Name) }); + CreateRdCapForce(runSpace, gateway, policyName, new List { GetUsersGroupName(collection.Name) }); } - CreateRdRapForce(runSpace, gateway, collection.Name, new List { GetUsersGroupName(collection.Name) }); + CreateRdRapForce(runSpace, gateway, policyName, collection.Name, new List { GetUsersGroupName(collection.Name) }); } if (CentralNps) { - CreateCentralNpsPolicy(runSpace, CentralNpsHost, collection.Name, organizationId); + CreateCentralNpsPolicy(runSpace, CentralNpsHost, policyName, collection.Name, organizationId); } //add user group to collection @@ -261,7 +263,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices return collection; } - public bool RemoveCollection(string organizationId, string collectionName) + public bool RemoveCollection(string organizationId, string tenantName, string collectionName) { var result = true; @@ -278,19 +280,21 @@ namespace WebsitePanel.Providers.RemoteDesktopServices ExecuteShellCommand(runSpace, cmd, false); + var policyName = GetPolicyName(tenantName, organizationId, collectionName); + foreach (var gateway in Gateways) { if (!CentralNps) { - RemoveRdCap(runSpace, gateway, collectionName); + RemoveRdCap(runSpace, gateway, policyName); } - RemoveRdRap(runSpace, gateway, collectionName); + RemoveRdRap(runSpace, gateway, policyName); } if (CentralNps) { - RemoveNpsPolicy(runSpace, CentralNpsHost, collectionName); + RemoveNpsPolicy(runSpace, CentralNpsHost, policyName); } //Remove security group @@ -537,7 +541,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices #region Gateaway (RD CAP | RD RAP) - internal void CreateCentralNpsPolicy(Runspace runSpace, string centralNpshost, string collectionName, string organizationId) + internal void CreateCentralNpsPolicy(Runspace runSpace, string centralNpshost, string policyName, string collectionName, string organizationId) { var showCmd = new Command("netsh nps show np"); @@ -549,35 +553,35 @@ namespace WebsitePanel.Providers.RemoteDesktopServices var sid = (byte[])ActiveDirectoryUtils.GetADObjectProperty(groupAd, "objectSid"); - var addCmdString = string.Format(AddNpsString, collectionName.Replace(" ", "_"), count, ConvertByteToStringSid(sid)); + var addCmdString = string.Format(AddNpsString, policyName.Replace(" ", "_"), count, ConvertByteToStringSid(sid)); Command addCmd = new Command(addCmdString); var result = ExecuteRemoteShellCommand(runSpace, centralNpshost, addCmd); } - internal void RemoveNpsPolicy(Runspace runSpace, string centralNpshost, string collectionName) + internal void RemoveNpsPolicy(Runspace runSpace, string centralNpshost, string policyName) { - var removeCmd = new Command(string.Format("netsh nps delete np {0}", collectionName.Replace(" ", "_"))); + var removeCmd = new Command(string.Format("netsh nps delete np {0}", policyName.Replace(" ", "_"))); var removeResult = ExecuteRemoteShellCommand(runSpace, centralNpshost, removeCmd); } - internal void CreateRdCapForce(Runspace runSpace, string gatewayHost, string name, List groups) + internal void CreateRdCapForce(Runspace runSpace, string gatewayHost, string policyName, List groups) { //New-Item -Path "RDS:\GatewayServer\CAP" -Name "Allow Admins" -UserGroups "Administrators@." -AuthMethod 1 //Set-Item -Path "RDS:\GatewayServer\CAP\Allow Admins\SessionTimeout" -Value 480 -SessionTimeoutAction 0 - if (ItemExistsRemote(runSpace, gatewayHost, Path.Combine(CapPath, name))) + if (ItemExistsRemote(runSpace, gatewayHost, Path.Combine(CapPath, policyName))) { - RemoveRdCap(runSpace, gatewayHost, name); + RemoveRdCap(runSpace, gatewayHost, policyName); } var userGroupParametr = string.Format("@({0})",string.Join(",", groups.Select(x => string.Format("\"{0}@{1}\"", x, RootDomain)).ToArray())); Command rdCapCommand = new Command("New-Item"); rdCapCommand.Parameters.Add("Path", string.Format("\"{0}\"", CapPath)); - rdCapCommand.Parameters.Add("Name", string.Format("\"{0}\"", name)); + rdCapCommand.Parameters.Add("Name", string.Format("\"{0}\"", policyName)); rdCapCommand.Parameters.Add("UserGroups", userGroupParametr); rdCapCommand.Parameters.Add("AuthMethod", 1); @@ -589,22 +593,22 @@ namespace WebsitePanel.Providers.RemoteDesktopServices RemoveItemRemote(runSpace, gatewayHost, string.Format(@"{0}\{1}", CapPath, name), RdsModuleName); } - internal void CreateRdRapForce(Runspace runSpace, string gatewayHost, string name, List groups) + internal void CreateRdRapForce(Runspace runSpace, string gatewayHost, string policyName, string collectionName, List groups) { //New-Item -Path "RDS:\GatewayServer\RAP" -Name "Allow Connections To Everywhere" -UserGroups "Administrators@." -ComputerGroupType 1 //Set-Item -Path "RDS:\GatewayServer\RAP\Allow Connections To Everywhere\PortNumbers" -Value 3389,3390 - if (ItemExistsRemote(runSpace, gatewayHost, Path.Combine(RapPath, name))) + if (ItemExistsRemote(runSpace, gatewayHost, Path.Combine(RapPath, policyName))) { - RemoveRdRap(runSpace, gatewayHost, name); + RemoveRdRap(runSpace, gatewayHost, policyName); } var userGroupParametr = string.Format("@({0})", string.Join(",", groups.Select(x => string.Format("\"{0}@{1}\"", x, RootDomain)).ToArray())); - var computerGroupParametr = string.Format("\"{0}@{1}\"", GetComputersGroupName(name), RootDomain); + var computerGroupParametr = string.Format("\"{0}@{1}\"", GetComputersGroupName(collectionName), RootDomain); Command rdRapCommand = new Command("New-Item"); rdRapCommand.Parameters.Add("Path", string.Format("\"{0}\"", RapPath)); - rdRapCommand.Parameters.Add("Name", string.Format("\"{0}\"", name)); + rdRapCommand.Parameters.Add("Name", string.Format("\"{0}\"", policyName)); rdRapCommand.Parameters.Add("UserGroups", userGroupParametr); rdRapCommand.Parameters.Add("ComputerGroupType", 1); rdRapCommand.Parameters.Add("ComputerGroup", computerGroupParametr); @@ -629,6 +633,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices ExecuteShellCommand(runSpace, cmd, false); } + + private bool ExistRdsServerInDeployment(Runspace runSpace, RdsServer server) { Command cmd = new Command("Get-RDserver"); @@ -924,6 +930,11 @@ namespace WebsitePanel.Providers.RemoteDesktopServices ExecuteRemoteShellCommand(runSpace, hostname, rdRapCommand, imports); } + private string GetPolicyName(string tenantName,string organizationId, string collectionName) + { + return string.Format("{0}-{1}-{2}", tenantName, organizationId, collectionName); + } + private string GetComputersGroupName(string collectionName) { return string.Format(RdsGroupFormat, collectionName, Computers.ToLowerInvariant()); diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs index 699cb445..24a78087 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs @@ -1,35 +1,7 @@ -// Copyright (c) 2014, Outercurve Foundation. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// - Neither the name of the Outercurve Foundation nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.6400 +// Runtime Version:2.0.50727.7905 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -39,1330 +11,1155 @@ // // This source code was auto-generated by wsdl, Version=2.0.50727.3038. // - -using WebsitePanel.Providers.HostedSolution; - namespace WebsitePanel.Providers.RemoteDesktopServices { - using System; - using System.ComponentModel; - using System.Diagnostics; - using System.Web.Services; - using System.Web.Services.Protocols; using System.Xml.Serialization; - + using System.Web.Services; + using System.ComponentModel; + using System.Web.Services.Protocols; + using System; + using System.Diagnostics; + + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Web.Services.WebServiceBindingAttribute(Name = "RemoteDesktopServicesSoap", Namespace = "http://smbsaas/websitepanel/server/")] - public partial class RemoteDesktopServices : Microsoft.Web.Services3.WebServicesClientProtocol - { + [System.Web.Services.WebServiceBindingAttribute(Name="RemoteDesktopServicesSoap", Namespace="http://smbsaas/websitepanel/server/")] + public partial class RemoteDesktopServices : Microsoft.Web.Services3.WebServicesClientProtocol { + public ServiceProviderSettingsSoapHeader ServiceProviderSettingsSoapHeaderValue; - + private System.Threading.SendOrPostCallback CreateCollectionOperationCompleted; - + private System.Threading.SendOrPostCallback GetCollectionOperationCompleted; - + private System.Threading.SendOrPostCallback RemoveCollectionOperationCompleted; - + private System.Threading.SendOrPostCallback SetUsersInCollectionOperationCompleted; - + private System.Threading.SendOrPostCallback AddSessionHostServerToCollectionOperationCompleted; - + private System.Threading.SendOrPostCallback AddSessionHostServersToCollectionOperationCompleted; - + private System.Threading.SendOrPostCallback RemoveSessionHostServerFromCollectionOperationCompleted; - + private System.Threading.SendOrPostCallback RemoveSessionHostServersFromCollectionOperationCompleted; - + private System.Threading.SendOrPostCallback GetAvailableRemoteApplicationsOperationCompleted; - + private System.Threading.SendOrPostCallback GetCollectionRemoteApplicationsOperationCompleted; - + private System.Threading.SendOrPostCallback AddRemoteApplicationOperationCompleted; - + private System.Threading.SendOrPostCallback AddRemoteApplicationsOperationCompleted; - + private System.Threading.SendOrPostCallback RemoveRemoteApplicationOperationCompleted; - + private System.Threading.SendOrPostCallback AddSessionHostFeatureToServerOperationCompleted; - + private System.Threading.SendOrPostCallback CheckSessionHostFeatureInstallationOperationCompleted; - + private System.Threading.SendOrPostCallback CheckServerAvailabilityOperationCompleted; - + /// - public RemoteDesktopServices() - { - this.Url = "http://127.0.0.1:9003/RemoteDesktopServices.asmx"; + public RemoteDesktopServices() { + this.Url = "http://localhost:9003/RemoteDesktopServices.asmx"; } - + /// public event CreateCollectionCompletedEventHandler CreateCollectionCompleted; - + /// public event GetCollectionCompletedEventHandler GetCollectionCompleted; - + /// public event RemoveCollectionCompletedEventHandler RemoveCollectionCompleted; - + /// public event SetUsersInCollectionCompletedEventHandler SetUsersInCollectionCompleted; - + /// public event AddSessionHostServerToCollectionCompletedEventHandler AddSessionHostServerToCollectionCompleted; - + /// public event AddSessionHostServersToCollectionCompletedEventHandler AddSessionHostServersToCollectionCompleted; - + /// public event RemoveSessionHostServerFromCollectionCompletedEventHandler RemoveSessionHostServerFromCollectionCompleted; - + /// public event RemoveSessionHostServersFromCollectionCompletedEventHandler RemoveSessionHostServersFromCollectionCompleted; - + /// public event GetAvailableRemoteApplicationsCompletedEventHandler GetAvailableRemoteApplicationsCompleted; - + /// public event GetCollectionRemoteApplicationsCompletedEventHandler GetCollectionRemoteApplicationsCompleted; - + /// public event AddRemoteApplicationCompletedEventHandler AddRemoteApplicationCompleted; - + /// public event AddRemoteApplicationsCompletedEventHandler AddRemoteApplicationsCompleted; - + /// public event RemoveRemoteApplicationCompletedEventHandler RemoveRemoteApplicationCompleted; - + /// public event AddSessionHostFeatureToServerCompletedEventHandler AddSessionHostFeatureToServerCompleted; - + /// public event CheckSessionHostFeatureInstallationCompletedEventHandler CheckSessionHostFeatureInstallationCompleted; - + /// public event CheckServerAvailabilityCompletedEventHandler CheckServerAvailabilityCompleted; - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateCollection", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool CreateCollection(string organizationId, RdsCollection collection) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool CreateCollection(string organizationId, string tenantName, RdsCollection collection) { object[] results = this.Invoke("CreateCollection", new object[] { - organizationId, - collection}); + organizationId, + tenantName, + collection}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginCreateCollection(string organizationId, RdsCollection collection, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCreateCollection(string organizationId, string tenantName, RdsCollection collection, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CreateCollection", new object[] { - organizationId, - collection}, callback, asyncState); + organizationId, + tenantName, + collection}, callback, asyncState); } - + /// - public bool EndCreateCollection(System.IAsyncResult asyncResult) - { + public bool EndCreateCollection(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void CreateCollectionAsync(string organizationId, RdsCollection collection) - { - this.CreateCollectionAsync(organizationId, collection, null); + public void CreateCollectionAsync(string organizationId, string tenantName, RdsCollection collection) { + this.CreateCollectionAsync(organizationId, tenantName, collection, null); } - + /// - public void CreateCollectionAsync(string organizationId, RdsCollection collection, object userState) - { - if ((this.CreateCollectionOperationCompleted == null)) - { + public void CreateCollectionAsync(string organizationId, string tenantName, RdsCollection collection, object userState) { + if ((this.CreateCollectionOperationCompleted == null)) { this.CreateCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateCollectionOperationCompleted); } this.InvokeAsync("CreateCollection", new object[] { - organizationId, - collection}, this.CreateCollectionOperationCompleted, userState); + organizationId, + tenantName, + collection}, this.CreateCollectionOperationCompleted, userState); } - - private void OnCreateCollectionOperationCompleted(object arg) - { - if ((this.CreateCollectionCompleted != null)) - { + + private void OnCreateCollectionOperationCompleted(object arg) { + if ((this.CreateCollectionCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateCollectionCompleted(this, new CreateCollectionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetCollection", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public RdsCollection GetCollection(string collectionName) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public RdsCollection GetCollection(string collectionName) { object[] results = this.Invoke("GetCollection", new object[] { - collectionName}); + collectionName}); return ((RdsCollection)(results[0])); } - + /// - public System.IAsyncResult BeginGetCollection(string collectionName, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetCollection(string collectionName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetCollection", new object[] { - collectionName}, callback, asyncState); + collectionName}, callback, asyncState); } - + /// - public RdsCollection EndGetCollection(System.IAsyncResult asyncResult) - { + public RdsCollection EndGetCollection(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((RdsCollection)(results[0])); } - + /// - public void GetCollectionAsync(string collectionName) - { + public void GetCollectionAsync(string collectionName) { this.GetCollectionAsync(collectionName, null); } - + /// - public void GetCollectionAsync(string collectionName, object userState) - { - if ((this.GetCollectionOperationCompleted == null)) - { + public void GetCollectionAsync(string collectionName, object userState) { + if ((this.GetCollectionOperationCompleted == null)) { this.GetCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetCollectionOperationCompleted); } this.InvokeAsync("GetCollection", new object[] { - collectionName}, this.GetCollectionOperationCompleted, userState); + collectionName}, this.GetCollectionOperationCompleted, userState); } - - private void OnGetCollectionOperationCompleted(object arg) - { - if ((this.GetCollectionCompleted != null)) - { + + private void OnGetCollectionOperationCompleted(object arg) { + if ((this.GetCollectionCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetCollectionCompleted(this, new GetCollectionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RemoveCollection", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool RemoveCollection(string organizationId, string collectionName) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RemoveCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool RemoveCollection(string organizationId, string tenantName, string collectionName) { object[] results = this.Invoke("RemoveCollection", new object[] { - organizationId, - collectionName}); + organizationId, + tenantName, + collectionName}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginRemoveCollection(string organizationId, string collectionName, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginRemoveCollection(string organizationId, string tenantName, string collectionName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("RemoveCollection", new object[] { - organizationId, - collectionName}, callback, asyncState); + organizationId, + tenantName, + collectionName}, callback, asyncState); } - + /// - public bool EndRemoveCollection(System.IAsyncResult asyncResult) - { + public bool EndRemoveCollection(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void RemoveCollectionAsync(string organizationId, string collectionName) - { - this.RemoveCollectionAsync(organizationId, collectionName, null); + public void RemoveCollectionAsync(string organizationId, string tenantName, string collectionName) { + this.RemoveCollectionAsync(organizationId, tenantName, collectionName, null); } - + /// - public void RemoveCollectionAsync(string organizationId, string collectionName, object userState) - { - if ((this.RemoveCollectionOperationCompleted == null)) - { + public void RemoveCollectionAsync(string organizationId, string tenantName, string collectionName, object userState) { + if ((this.RemoveCollectionOperationCompleted == null)) { this.RemoveCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveCollectionOperationCompleted); } this.InvokeAsync("RemoveCollection", new object[] { - organizationId, - collectionName}, this.RemoveCollectionOperationCompleted, userState); + organizationId, + tenantName, + collectionName}, this.RemoveCollectionOperationCompleted, userState); } - - private void OnRemoveCollectionOperationCompleted(object arg) - { - if ((this.RemoveCollectionCompleted != null)) - { + + private void OnRemoveCollectionOperationCompleted(object arg) { + if ((this.RemoveCollectionCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.RemoveCollectionCompleted(this, new RemoveCollectionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetUsersInCollection", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool SetUsersInCollection(string organizationId, string collectionName, string[] users) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetUsersInCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool SetUsersInCollection(string organizationId, string collectionName, string[] users) { object[] results = this.Invoke("SetUsersInCollection", new object[] { - organizationId, - collectionName, - users}); + organizationId, + collectionName, + users}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginSetUsersInCollection(string organizationId, string collectionName, string[] users, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetUsersInCollection(string organizationId, string collectionName, string[] users, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetUsersInCollection", new object[] { - organizationId, - collectionName, - users}, callback, asyncState); + organizationId, + collectionName, + users}, callback, asyncState); } - + /// - public bool EndSetUsersInCollection(System.IAsyncResult asyncResult) - { + public bool EndSetUsersInCollection(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void SetUsersInCollectionAsync(string organizationId, string collectionName, string[] users) - { + public void SetUsersInCollectionAsync(string organizationId, string collectionName, string[] users) { this.SetUsersInCollectionAsync(organizationId, collectionName, users, null); } - + /// - public void SetUsersInCollectionAsync(string organizationId, string collectionName, string[] users, object userState) - { - if ((this.SetUsersInCollectionOperationCompleted == null)) - { + public void SetUsersInCollectionAsync(string organizationId, string collectionName, string[] users, object userState) { + if ((this.SetUsersInCollectionOperationCompleted == null)) { this.SetUsersInCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUsersInCollectionOperationCompleted); } this.InvokeAsync("SetUsersInCollection", new object[] { - organizationId, - collectionName, - users}, this.SetUsersInCollectionOperationCompleted, userState); + organizationId, + collectionName, + users}, this.SetUsersInCollectionOperationCompleted, userState); } - - private void OnSetUsersInCollectionOperationCompleted(object arg) - { - if ((this.SetUsersInCollectionCompleted != null)) - { + + private void OnSetUsersInCollectionOperationCompleted(object arg) { + if ((this.SetUsersInCollectionCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetUsersInCollectionCompleted(this, new SetUsersInCollectionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddSessionHostServerToCollection", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void AddSessionHostServerToCollection(string organizationId, string collectionName, RdsServer server) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddSessionHostServerToCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void AddSessionHostServerToCollection(string organizationId, string collectionName, RdsServer server) { this.Invoke("AddSessionHostServerToCollection", new object[] { - organizationId, - collectionName, - server}); + organizationId, + collectionName, + server}); } - + /// - public System.IAsyncResult BeginAddSessionHostServerToCollection(string organizationId, string collectionName, RdsServer server, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginAddSessionHostServerToCollection(string organizationId, string collectionName, RdsServer server, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("AddSessionHostServerToCollection", new object[] { - organizationId, - collectionName, - server}, callback, asyncState); + organizationId, + collectionName, + server}, callback, asyncState); } - + /// - public void EndAddSessionHostServerToCollection(System.IAsyncResult asyncResult) - { + public void EndAddSessionHostServerToCollection(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } - + /// - public void AddSessionHostServerToCollectionAsync(string organizationId, string collectionName, RdsServer server) - { + public void AddSessionHostServerToCollectionAsync(string organizationId, string collectionName, RdsServer server) { this.AddSessionHostServerToCollectionAsync(organizationId, collectionName, server, null); } - + /// - public void AddSessionHostServerToCollectionAsync(string organizationId, string collectionName, RdsServer server, object userState) - { - if ((this.AddSessionHostServerToCollectionOperationCompleted == null)) - { + public void AddSessionHostServerToCollectionAsync(string organizationId, string collectionName, RdsServer server, object userState) { + if ((this.AddSessionHostServerToCollectionOperationCompleted == null)) { this.AddSessionHostServerToCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddSessionHostServerToCollectionOperationCompleted); } this.InvokeAsync("AddSessionHostServerToCollection", new object[] { - organizationId, - collectionName, - server}, this.AddSessionHostServerToCollectionOperationCompleted, userState); + organizationId, + collectionName, + server}, this.AddSessionHostServerToCollectionOperationCompleted, userState); } - - private void OnAddSessionHostServerToCollectionOperationCompleted(object arg) - { - if ((this.AddSessionHostServerToCollectionCompleted != null)) - { + + private void OnAddSessionHostServerToCollectionOperationCompleted(object arg) { + if ((this.AddSessionHostServerToCollectionCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddSessionHostServerToCollectionCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddSessionHostServersToCollection", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void AddSessionHostServersToCollection(string organizationId, string collectionName, RdsServer[] servers) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddSessionHostServersToCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void AddSessionHostServersToCollection(string organizationId, string collectionName, RdsServer[] servers) { this.Invoke("AddSessionHostServersToCollection", new object[] { - organizationId, - collectionName, - servers}); + organizationId, + collectionName, + servers}); } - + /// - public System.IAsyncResult BeginAddSessionHostServersToCollection(string organizationId, string collectionName, RdsServer[] servers, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginAddSessionHostServersToCollection(string organizationId, string collectionName, RdsServer[] servers, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("AddSessionHostServersToCollection", new object[] { - organizationId, - collectionName, - servers}, callback, asyncState); + organizationId, + collectionName, + servers}, callback, asyncState); } - + /// - public void EndAddSessionHostServersToCollection(System.IAsyncResult asyncResult) - { + public void EndAddSessionHostServersToCollection(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } - + /// - public void AddSessionHostServersToCollectionAsync(string organizationId, string collectionName, RdsServer[] servers) - { + public void AddSessionHostServersToCollectionAsync(string organizationId, string collectionName, RdsServer[] servers) { this.AddSessionHostServersToCollectionAsync(organizationId, collectionName, servers, null); } - + /// - public void AddSessionHostServersToCollectionAsync(string organizationId, string collectionName, RdsServer[] servers, object userState) - { - if ((this.AddSessionHostServersToCollectionOperationCompleted == null)) - { + public void AddSessionHostServersToCollectionAsync(string organizationId, string collectionName, RdsServer[] servers, object userState) { + if ((this.AddSessionHostServersToCollectionOperationCompleted == null)) { this.AddSessionHostServersToCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddSessionHostServersToCollectionOperationCompleted); } this.InvokeAsync("AddSessionHostServersToCollection", new object[] { - organizationId, - collectionName, - servers}, this.AddSessionHostServersToCollectionOperationCompleted, userState); + organizationId, + collectionName, + servers}, this.AddSessionHostServersToCollectionOperationCompleted, userState); } - - private void OnAddSessionHostServersToCollectionOperationCompleted(object arg) - { - if ((this.AddSessionHostServersToCollectionCompleted != null)) - { + + private void OnAddSessionHostServersToCollectionOperationCompleted(object arg) { + if ((this.AddSessionHostServersToCollectionCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddSessionHostServersToCollectionCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RemoveSessionHostServerFromCollection", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void RemoveSessionHostServerFromCollection(string organizationId, string collectionName, RdsServer server) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RemoveSessionHostServerFromCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void RemoveSessionHostServerFromCollection(string organizationId, string collectionName, RdsServer server) { this.Invoke("RemoveSessionHostServerFromCollection", new object[] { - organizationId, - collectionName, - server}); + organizationId, + collectionName, + server}); } - + /// - public System.IAsyncResult BeginRemoveSessionHostServerFromCollection(string organizationId, string collectionName, RdsServer server, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginRemoveSessionHostServerFromCollection(string organizationId, string collectionName, RdsServer server, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("RemoveSessionHostServerFromCollection", new object[] { - organizationId, - collectionName, - server}, callback, asyncState); + organizationId, + collectionName, + server}, callback, asyncState); } - + /// - public void EndRemoveSessionHostServerFromCollection(System.IAsyncResult asyncResult) - { + public void EndRemoveSessionHostServerFromCollection(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } - + /// - public void RemoveSessionHostServerFromCollectionAsync(string organizationId, string collectionName, RdsServer server) - { + public void RemoveSessionHostServerFromCollectionAsync(string organizationId, string collectionName, RdsServer server) { this.RemoveSessionHostServerFromCollectionAsync(organizationId, collectionName, server, null); } - + /// - public void RemoveSessionHostServerFromCollectionAsync(string organizationId, string collectionName, RdsServer server, object userState) - { - if ((this.RemoveSessionHostServerFromCollectionOperationCompleted == null)) - { + public void RemoveSessionHostServerFromCollectionAsync(string organizationId, string collectionName, RdsServer server, object userState) { + if ((this.RemoveSessionHostServerFromCollectionOperationCompleted == null)) { this.RemoveSessionHostServerFromCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveSessionHostServerFromCollectionOperationCompleted); } this.InvokeAsync("RemoveSessionHostServerFromCollection", new object[] { - organizationId, - collectionName, - server}, this.RemoveSessionHostServerFromCollectionOperationCompleted, userState); + organizationId, + collectionName, + server}, this.RemoveSessionHostServerFromCollectionOperationCompleted, userState); } - - private void OnRemoveSessionHostServerFromCollectionOperationCompleted(object arg) - { - if ((this.RemoveSessionHostServerFromCollectionCompleted != null)) - { + + private void OnRemoveSessionHostServerFromCollectionOperationCompleted(object arg) { + if ((this.RemoveSessionHostServerFromCollectionCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.RemoveSessionHostServerFromCollectionCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RemoveSessionHostServersFromCollection", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void RemoveSessionHostServersFromCollection(string organizationId, string collectionName, RdsServer[] servers) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RemoveSessionHostServersFromCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void RemoveSessionHostServersFromCollection(string organizationId, string collectionName, RdsServer[] servers) { this.Invoke("RemoveSessionHostServersFromCollection", new object[] { - organizationId, - collectionName, - servers}); + organizationId, + collectionName, + servers}); } - + /// - public System.IAsyncResult BeginRemoveSessionHostServersFromCollection(string organizationId, string collectionName, RdsServer[] servers, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginRemoveSessionHostServersFromCollection(string organizationId, string collectionName, RdsServer[] servers, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("RemoveSessionHostServersFromCollection", new object[] { - organizationId, - collectionName, - servers}, callback, asyncState); + organizationId, + collectionName, + servers}, callback, asyncState); } - + /// - public void EndRemoveSessionHostServersFromCollection(System.IAsyncResult asyncResult) - { + public void EndRemoveSessionHostServersFromCollection(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } - + /// - public void RemoveSessionHostServersFromCollectionAsync(string organizationId, string collectionName, RdsServer[] servers) - { + public void RemoveSessionHostServersFromCollectionAsync(string organizationId, string collectionName, RdsServer[] servers) { this.RemoveSessionHostServersFromCollectionAsync(organizationId, collectionName, servers, null); } - + /// - public void RemoveSessionHostServersFromCollectionAsync(string organizationId, string collectionName, RdsServer[] servers, object userState) - { - if ((this.RemoveSessionHostServersFromCollectionOperationCompleted == null)) - { + public void RemoveSessionHostServersFromCollectionAsync(string organizationId, string collectionName, RdsServer[] servers, object userState) { + if ((this.RemoveSessionHostServersFromCollectionOperationCompleted == null)) { this.RemoveSessionHostServersFromCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveSessionHostServersFromCollectionOperationCompleted); } this.InvokeAsync("RemoveSessionHostServersFromCollection", new object[] { - organizationId, - collectionName, - servers}, this.RemoveSessionHostServersFromCollectionOperationCompleted, userState); + organizationId, + collectionName, + servers}, this.RemoveSessionHostServersFromCollectionOperationCompleted, userState); } - - private void OnRemoveSessionHostServersFromCollectionOperationCompleted(object arg) - { - if ((this.RemoveSessionHostServersFromCollectionCompleted != null)) - { + + private void OnRemoveSessionHostServersFromCollectionOperationCompleted(object arg) { + if ((this.RemoveSessionHostServersFromCollectionCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.RemoveSessionHostServersFromCollectionCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetAvailableRemoteApplications", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public StartMenuApp[] GetAvailableRemoteApplications(string collectionName) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetAvailableRemoteApplications", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public StartMenuApp[] GetAvailableRemoteApplications(string collectionName) { object[] results = this.Invoke("GetAvailableRemoteApplications", new object[] { - collectionName}); + collectionName}); return ((StartMenuApp[])(results[0])); } - + /// - public System.IAsyncResult BeginGetAvailableRemoteApplications(string collectionName, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetAvailableRemoteApplications(string collectionName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetAvailableRemoteApplications", new object[] { - collectionName}, callback, asyncState); + collectionName}, callback, asyncState); } - + /// - public StartMenuApp[] EndGetAvailableRemoteApplications(System.IAsyncResult asyncResult) - { + public StartMenuApp[] EndGetAvailableRemoteApplications(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((StartMenuApp[])(results[0])); } - + /// - public void GetAvailableRemoteApplicationsAsync(string collectionName) - { + public void GetAvailableRemoteApplicationsAsync(string collectionName) { this.GetAvailableRemoteApplicationsAsync(collectionName, null); } - + /// - public void GetAvailableRemoteApplicationsAsync(string collectionName, object userState) - { - if ((this.GetAvailableRemoteApplicationsOperationCompleted == null)) - { + public void GetAvailableRemoteApplicationsAsync(string collectionName, object userState) { + if ((this.GetAvailableRemoteApplicationsOperationCompleted == null)) { this.GetAvailableRemoteApplicationsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAvailableRemoteApplicationsOperationCompleted); } this.InvokeAsync("GetAvailableRemoteApplications", new object[] { - collectionName}, this.GetAvailableRemoteApplicationsOperationCompleted, userState); + collectionName}, this.GetAvailableRemoteApplicationsOperationCompleted, userState); } - - private void OnGetAvailableRemoteApplicationsOperationCompleted(object arg) - { - if ((this.GetAvailableRemoteApplicationsCompleted != null)) - { + + private void OnGetAvailableRemoteApplicationsOperationCompleted(object arg) { + if ((this.GetAvailableRemoteApplicationsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetAvailableRemoteApplicationsCompleted(this, new GetAvailableRemoteApplicationsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetCollectionRemoteApplications", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public RemoteApplication[] GetCollectionRemoteApplications(string collectionName) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetCollectionRemoteApplications", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public RemoteApplication[] GetCollectionRemoteApplications(string collectionName) { object[] results = this.Invoke("GetCollectionRemoteApplications", new object[] { - collectionName}); + collectionName}); return ((RemoteApplication[])(results[0])); } - + /// - public System.IAsyncResult BeginGetCollectionRemoteApplications(string collectionName, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetCollectionRemoteApplications(string collectionName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetCollectionRemoteApplications", new object[] { - collectionName}, callback, asyncState); + collectionName}, callback, asyncState); } - + /// - public RemoteApplication[] EndGetCollectionRemoteApplications(System.IAsyncResult asyncResult) - { + public RemoteApplication[] EndGetCollectionRemoteApplications(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((RemoteApplication[])(results[0])); } - + /// - public void GetCollectionRemoteApplicationsAsync(string collectionName) - { + public void GetCollectionRemoteApplicationsAsync(string collectionName) { this.GetCollectionRemoteApplicationsAsync(collectionName, null); } - + /// - public void GetCollectionRemoteApplicationsAsync(string collectionName, object userState) - { - if ((this.GetCollectionRemoteApplicationsOperationCompleted == null)) - { + public void GetCollectionRemoteApplicationsAsync(string collectionName, object userState) { + if ((this.GetCollectionRemoteApplicationsOperationCompleted == null)) { this.GetCollectionRemoteApplicationsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetCollectionRemoteApplicationsOperationCompleted); } this.InvokeAsync("GetCollectionRemoteApplications", new object[] { - collectionName}, this.GetCollectionRemoteApplicationsOperationCompleted, userState); + collectionName}, this.GetCollectionRemoteApplicationsOperationCompleted, userState); } - - private void OnGetCollectionRemoteApplicationsOperationCompleted(object arg) - { - if ((this.GetCollectionRemoteApplicationsCompleted != null)) - { + + private void OnGetCollectionRemoteApplicationsOperationCompleted(object arg) { + if ((this.GetCollectionRemoteApplicationsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetCollectionRemoteApplicationsCompleted(this, new GetCollectionRemoteApplicationsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddRemoteApplication", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool AddRemoteApplication(string collectionName, RemoteApplication remoteApp) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddRemoteApplication", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool AddRemoteApplication(string collectionName, RemoteApplication remoteApp) { object[] results = this.Invoke("AddRemoteApplication", new object[] { - collectionName, - remoteApp}); + collectionName, + remoteApp}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginAddRemoteApplication(string collectionName, RemoteApplication remoteApp, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginAddRemoteApplication(string collectionName, RemoteApplication remoteApp, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("AddRemoteApplication", new object[] { - collectionName, - remoteApp}, callback, asyncState); + collectionName, + remoteApp}, callback, asyncState); } - + /// - public bool EndAddRemoteApplication(System.IAsyncResult asyncResult) - { + public bool EndAddRemoteApplication(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void AddRemoteApplicationAsync(string collectionName, RemoteApplication remoteApp) - { + public void AddRemoteApplicationAsync(string collectionName, RemoteApplication remoteApp) { this.AddRemoteApplicationAsync(collectionName, remoteApp, null); } - + /// - public void AddRemoteApplicationAsync(string collectionName, RemoteApplication remoteApp, object userState) - { - if ((this.AddRemoteApplicationOperationCompleted == null)) - { + public void AddRemoteApplicationAsync(string collectionName, RemoteApplication remoteApp, object userState) { + if ((this.AddRemoteApplicationOperationCompleted == null)) { this.AddRemoteApplicationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddRemoteApplicationOperationCompleted); } this.InvokeAsync("AddRemoteApplication", new object[] { - collectionName, - remoteApp}, this.AddRemoteApplicationOperationCompleted, userState); + collectionName, + remoteApp}, this.AddRemoteApplicationOperationCompleted, userState); } - - private void OnAddRemoteApplicationOperationCompleted(object arg) - { - if ((this.AddRemoteApplicationCompleted != null)) - { + + private void OnAddRemoteApplicationOperationCompleted(object arg) { + if ((this.AddRemoteApplicationCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddRemoteApplicationCompleted(this, new AddRemoteApplicationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddRemoteApplications", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool AddRemoteApplications(string collectionName, RemoteApplication[] remoteApps) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddRemoteApplications", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool AddRemoteApplications(string collectionName, RemoteApplication[] remoteApps) { object[] results = this.Invoke("AddRemoteApplications", new object[] { - collectionName, - remoteApps}); + collectionName, + remoteApps}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginAddRemoteApplications(string collectionName, RemoteApplication[] remoteApps, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginAddRemoteApplications(string collectionName, RemoteApplication[] remoteApps, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("AddRemoteApplications", new object[] { - collectionName, - remoteApps}, callback, asyncState); + collectionName, + remoteApps}, callback, asyncState); } - + /// - public bool EndAddRemoteApplications(System.IAsyncResult asyncResult) - { + public bool EndAddRemoteApplications(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void AddRemoteApplicationsAsync(string collectionName, RemoteApplication[] remoteApps) - { + public void AddRemoteApplicationsAsync(string collectionName, RemoteApplication[] remoteApps) { this.AddRemoteApplicationsAsync(collectionName, remoteApps, null); } - + /// - public void AddRemoteApplicationsAsync(string collectionName, RemoteApplication[] remoteApps, object userState) - { - if ((this.AddRemoteApplicationsOperationCompleted == null)) - { + public void AddRemoteApplicationsAsync(string collectionName, RemoteApplication[] remoteApps, object userState) { + if ((this.AddRemoteApplicationsOperationCompleted == null)) { this.AddRemoteApplicationsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddRemoteApplicationsOperationCompleted); } this.InvokeAsync("AddRemoteApplications", new object[] { - collectionName, - remoteApps}, this.AddRemoteApplicationsOperationCompleted, userState); + collectionName, + remoteApps}, this.AddRemoteApplicationsOperationCompleted, userState); } - - private void OnAddRemoteApplicationsOperationCompleted(object arg) - { - if ((this.AddRemoteApplicationsCompleted != null)) - { + + private void OnAddRemoteApplicationsOperationCompleted(object arg) { + if ((this.AddRemoteApplicationsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddRemoteApplicationsCompleted(this, new AddRemoteApplicationsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RemoveRemoteApplication", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool RemoveRemoteApplication(string collectionName, RemoteApplication remoteApp) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RemoveRemoteApplication", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool RemoveRemoteApplication(string collectionName, RemoteApplication remoteApp) { object[] results = this.Invoke("RemoveRemoteApplication", new object[] { - collectionName, - remoteApp}); + collectionName, + remoteApp}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginRemoveRemoteApplication(string collectionName, RemoteApplication remoteApp, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginRemoveRemoteApplication(string collectionName, RemoteApplication remoteApp, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("RemoveRemoteApplication", new object[] { - collectionName, - remoteApp}, callback, asyncState); + collectionName, + remoteApp}, callback, asyncState); } - + /// - public bool EndRemoveRemoteApplication(System.IAsyncResult asyncResult) - { + public bool EndRemoveRemoteApplication(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void RemoveRemoteApplicationAsync(string collectionName, RemoteApplication remoteApp) - { + public void RemoveRemoteApplicationAsync(string collectionName, RemoteApplication remoteApp) { this.RemoveRemoteApplicationAsync(collectionName, remoteApp, null); } - + /// - public void RemoveRemoteApplicationAsync(string collectionName, RemoteApplication remoteApp, object userState) - { - if ((this.RemoveRemoteApplicationOperationCompleted == null)) - { + public void RemoveRemoteApplicationAsync(string collectionName, RemoteApplication remoteApp, object userState) { + if ((this.RemoveRemoteApplicationOperationCompleted == null)) { this.RemoveRemoteApplicationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveRemoteApplicationOperationCompleted); } this.InvokeAsync("RemoveRemoteApplication", new object[] { - collectionName, - remoteApp}, this.RemoveRemoteApplicationOperationCompleted, userState); + collectionName, + remoteApp}, this.RemoveRemoteApplicationOperationCompleted, userState); } - - private void OnRemoveRemoteApplicationOperationCompleted(object arg) - { - if ((this.RemoveRemoteApplicationCompleted != null)) - { + + private void OnRemoveRemoteApplicationOperationCompleted(object arg) { + if ((this.RemoveRemoteApplicationCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.RemoveRemoteApplicationCompleted(this, new RemoveRemoteApplicationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddSessionHostFeatureToServer", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool AddSessionHostFeatureToServer(string hostName) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddSessionHostFeatureToServer", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool AddSessionHostFeatureToServer(string hostName) { object[] results = this.Invoke("AddSessionHostFeatureToServer", new object[] { - hostName}); + hostName}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginAddSessionHostFeatureToServer(string hostName, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginAddSessionHostFeatureToServer(string hostName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("AddSessionHostFeatureToServer", new object[] { - hostName}, callback, asyncState); + hostName}, callback, asyncState); } - + /// - public bool EndAddSessionHostFeatureToServer(System.IAsyncResult asyncResult) - { + public bool EndAddSessionHostFeatureToServer(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void AddSessionHostFeatureToServerAsync(string hostName) - { + public void AddSessionHostFeatureToServerAsync(string hostName) { this.AddSessionHostFeatureToServerAsync(hostName, null); } - + /// - public void AddSessionHostFeatureToServerAsync(string hostName, object userState) - { - if ((this.AddSessionHostFeatureToServerOperationCompleted == null)) - { + public void AddSessionHostFeatureToServerAsync(string hostName, object userState) { + if ((this.AddSessionHostFeatureToServerOperationCompleted == null)) { this.AddSessionHostFeatureToServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddSessionHostFeatureToServerOperationCompleted); } this.InvokeAsync("AddSessionHostFeatureToServer", new object[] { - hostName}, this.AddSessionHostFeatureToServerOperationCompleted, userState); + hostName}, this.AddSessionHostFeatureToServerOperationCompleted, userState); } - - private void OnAddSessionHostFeatureToServerOperationCompleted(object arg) - { - if ((this.AddSessionHostFeatureToServerCompleted != null)) - { + + private void OnAddSessionHostFeatureToServerOperationCompleted(object arg) { + if ((this.AddSessionHostFeatureToServerCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddSessionHostFeatureToServerCompleted(this, new AddSessionHostFeatureToServerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CheckSessionHostFeatureInstallation", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool CheckSessionHostFeatureInstallation(string hostName) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CheckSessionHostFeatureInstallation", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool CheckSessionHostFeatureInstallation(string hostName) { object[] results = this.Invoke("CheckSessionHostFeatureInstallation", new object[] { - hostName}); + hostName}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginCheckSessionHostFeatureInstallation(string hostName, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCheckSessionHostFeatureInstallation(string hostName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CheckSessionHostFeatureInstallation", new object[] { - hostName}, callback, asyncState); + hostName}, callback, asyncState); } - + /// - public bool EndCheckSessionHostFeatureInstallation(System.IAsyncResult asyncResult) - { + public bool EndCheckSessionHostFeatureInstallation(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void CheckSessionHostFeatureInstallationAsync(string hostName) - { + public void CheckSessionHostFeatureInstallationAsync(string hostName) { this.CheckSessionHostFeatureInstallationAsync(hostName, null); } - + /// - public void CheckSessionHostFeatureInstallationAsync(string hostName, object userState) - { - if ((this.CheckSessionHostFeatureInstallationOperationCompleted == null)) - { + public void CheckSessionHostFeatureInstallationAsync(string hostName, object userState) { + if ((this.CheckSessionHostFeatureInstallationOperationCompleted == null)) { this.CheckSessionHostFeatureInstallationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckSessionHostFeatureInstallationOperationCompleted); } this.InvokeAsync("CheckSessionHostFeatureInstallation", new object[] { - hostName}, this.CheckSessionHostFeatureInstallationOperationCompleted, userState); + hostName}, this.CheckSessionHostFeatureInstallationOperationCompleted, userState); } - - private void OnCheckSessionHostFeatureInstallationOperationCompleted(object arg) - { - if ((this.CheckSessionHostFeatureInstallationCompleted != null)) - { + + private void OnCheckSessionHostFeatureInstallationOperationCompleted(object arg) { + if ((this.CheckSessionHostFeatureInstallationCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CheckSessionHostFeatureInstallationCompleted(this, new CheckSessionHostFeatureInstallationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CheckServerAvailability", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool CheckServerAvailability(string hostName) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CheckServerAvailability", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool CheckServerAvailability(string hostName) { object[] results = this.Invoke("CheckServerAvailability", new object[] { - hostName}); + hostName}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginCheckServerAvailability(string hostName, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCheckServerAvailability(string hostName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CheckServerAvailability", new object[] { - hostName}, callback, asyncState); + hostName}, callback, asyncState); } - + /// - public bool EndCheckServerAvailability(System.IAsyncResult asyncResult) - { + public bool EndCheckServerAvailability(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void CheckServerAvailabilityAsync(string hostName) - { + public void CheckServerAvailabilityAsync(string hostName) { this.CheckServerAvailabilityAsync(hostName, null); } - + /// - public void CheckServerAvailabilityAsync(string hostName, object userState) - { - if ((this.CheckServerAvailabilityOperationCompleted == null)) - { + public void CheckServerAvailabilityAsync(string hostName, object userState) { + if ((this.CheckServerAvailabilityOperationCompleted == null)) { this.CheckServerAvailabilityOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckServerAvailabilityOperationCompleted); } this.InvokeAsync("CheckServerAvailability", new object[] { - hostName}, this.CheckServerAvailabilityOperationCompleted, userState); + hostName}, this.CheckServerAvailabilityOperationCompleted, userState); } - - private void OnCheckServerAvailabilityOperationCompleted(object arg) - { - if ((this.CheckServerAvailabilityCompleted != null)) - { + + private void OnCheckServerAvailabilityOperationCompleted(object arg) { + if ((this.CheckServerAvailabilityCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CheckServerAvailabilityCompleted(this, new CheckServerAvailabilityCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - public new void CancelAsync(object userState) - { + public new void CancelAsync(object userState) { base.CancelAsync(userState); } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CreateCollectionCompletedEventHandler(object sender, CreateCollectionCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class CreateCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CreateCollectionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal CreateCollectionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetCollectionCompletedEventHandler(object sender, GetCollectionCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetCollectionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetCollectionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public RdsCollection Result - { - get - { + public RdsCollection Result { + get { this.RaiseExceptionIfNecessary(); return ((RdsCollection)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void RemoveCollectionCompletedEventHandler(object sender, RemoveCollectionCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class RemoveCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class RemoveCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal RemoveCollectionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal RemoveCollectionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SetUsersInCollectionCompletedEventHandler(object sender, SetUsersInCollectionCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetUsersInCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetUsersInCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetUsersInCollectionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetUsersInCollectionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void AddSessionHostServerToCollectionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void AddSessionHostServersToCollectionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void RemoveSessionHostServerFromCollectionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void RemoveSessionHostServersFromCollectionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetAvailableRemoteApplicationsCompletedEventHandler(object sender, GetAvailableRemoteApplicationsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetAvailableRemoteApplicationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetAvailableRemoteApplicationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetAvailableRemoteApplicationsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetAvailableRemoteApplicationsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public StartMenuApp[] Result - { - get - { + public StartMenuApp[] Result { + get { this.RaiseExceptionIfNecessary(); return ((StartMenuApp[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetCollectionRemoteApplicationsCompletedEventHandler(object sender, GetCollectionRemoteApplicationsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetCollectionRemoteApplicationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetCollectionRemoteApplicationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetCollectionRemoteApplicationsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetCollectionRemoteApplicationsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public RemoteApplication[] Result - { - get - { + public RemoteApplication[] Result { + get { this.RaiseExceptionIfNecessary(); return ((RemoteApplication[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void AddRemoteApplicationCompletedEventHandler(object sender, AddRemoteApplicationCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddRemoteApplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class AddRemoteApplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal AddRemoteApplicationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal AddRemoteApplicationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void AddRemoteApplicationsCompletedEventHandler(object sender, AddRemoteApplicationsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddRemoteApplicationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class AddRemoteApplicationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal AddRemoteApplicationsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal AddRemoteApplicationsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void RemoveRemoteApplicationCompletedEventHandler(object sender, RemoveRemoteApplicationCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class RemoveRemoteApplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class RemoveRemoteApplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal RemoveRemoteApplicationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal RemoveRemoteApplicationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void AddSessionHostFeatureToServerCompletedEventHandler(object sender, AddSessionHostFeatureToServerCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddSessionHostFeatureToServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class AddSessionHostFeatureToServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal AddSessionHostFeatureToServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal AddSessionHostFeatureToServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CheckSessionHostFeatureInstallationCompletedEventHandler(object sender, CheckSessionHostFeatureInstallationCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CheckSessionHostFeatureInstallationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class CheckSessionHostFeatureInstallationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CheckSessionHostFeatureInstallationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal CheckSessionHostFeatureInstallationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CheckServerAvailabilityCompletedEventHandler(object sender, CheckServerAvailabilityCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CheckServerAvailabilityCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class CheckServerAvailabilityCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CheckServerAvailabilityCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal CheckServerAvailabilityCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - } diff --git a/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs index 96836db9..b7e4d7a7 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs @@ -60,12 +60,12 @@ namespace WebsitePanel.Server } [WebMethod, SoapHeader("settings")] - public bool CreateCollection(string organizationId, RdsCollection collection) + public bool CreateCollection(string organizationId, string tenantName, RdsCollection collection) { try { Log.WriteStart("'{0}' CreateCollection", ProviderSettings.ProviderName); - var result = RDSProvider.CreateCollection(organizationId, collection); + var result = RDSProvider.CreateCollection(organizationId, tenantName, collection); Log.WriteEnd("'{0}' CreateCollection", ProviderSettings.ProviderName); return result; } @@ -94,12 +94,12 @@ namespace WebsitePanel.Server } [WebMethod, SoapHeader("settings")] - public bool RemoveCollection(string organizationId, string collectionName) + public bool RemoveCollection(string organizationId, string tenantName, string collectionName) { try { Log.WriteStart("'{0}' RemoveCollection", ProviderSettings.ProviderName); - var result = RDSProvider.RemoveCollection(organizationId,collectionName); + var result = RDSProvider.RemoveCollection(organizationId, tenantName, collectionName); Log.WriteEnd("'{0}' RemoveCollection", ProviderSettings.ProviderName); return result; } From e49f5223d0592f8183c2daf353ea135fc680f9df Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Wed, 19 Nov 2014 03:21:26 -0800 Subject: [PATCH 13/42] RDS CAP RAP name forming changed, added pc group to RAP CAP settings --- .../RemoteDesktopServicesController.cs | 12 ++------ .../IRemoteDesktopServices.cs | 4 +-- .../Windows2012.cs | 30 +++++++++++-------- .../RemoteDesktopServicesProxy.cs | 26 +++++++--------- .../RemoteDesktopServices.asmx.cs | 8 ++--- 5 files changed, 36 insertions(+), 44 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs index 5f72aec1..f2a3ca42 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs @@ -252,11 +252,7 @@ namespace WebsitePanel.EnterpriseServer var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); - var package = PackageController.GetPackage(org.PackageId); - - var tenant = UserController.GetUser(package.UserId); - - rds.CreateCollection(org.OrganizationId, tenant.Username, collection); + rds.CreateCollection(org.OrganizationId, collection); collection.Id = DataProvider.AddRDSCollection(itemId, collection.Name, collection.Description); @@ -324,11 +320,7 @@ namespace WebsitePanel.EnterpriseServer var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); - var package = PackageController.GetPackage(org.PackageId); - - var tenant = UserController.GetUser(package.UserId); - - rds.RemoveCollection(org.OrganizationId, tenant.Username, collection.Name); + rds.RemoveCollection(org.OrganizationId, collection.Name); DataProvider.DeleteRDSCollection(collection.Id); } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs index ca7fabd3..6cf5ec6b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs @@ -39,9 +39,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices /// public interface IRemoteDesktopServices { - bool CreateCollection(string organizationId, string tenantName, RdsCollection collection); + bool CreateCollection(string organizationId, RdsCollection collection); RdsCollection GetCollection(string collectionName); - bool RemoveCollection(string organizationId, string tenantName, string collectionName); + bool RemoveCollection(string organizationId, string collectionName); bool SetUsersInCollection(string organizationId, string collectionName, List users); void AddSessionHostServerToCollection(string organizationId, string collectionName, RdsServer server); void AddSessionHostServersToCollection(string organizationId, string collectionName, List servers); diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs b/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs index a3563eb4..ccc6edea 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs @@ -62,7 +62,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices private const string Users = "users"; private const string RdsGroupFormat = "rds-{0}-{1}"; private const string RdsModuleName = "RemoteDesktopServices"; - private const string AddNpsString = "netsh nps add np name=\"\"{0}\"\" policysource=\"1\" processingorder=\"{1}\" conditionid=\"0x3d\" conditiondata=\"^5$\" conditionid=\"0x1fb5\" conditiondata=\"{2}\" conditionid=\"0x1e\" conditiondata=\"UserAuthType:(PW|CA)\" profileid=\"0x1005\" profiledata=\"TRUE\" profileid=\"0x100f\" profiledata=\"TRUE\" profileid=\"0x1009\" profiledata=\"0x7\" profileid=\"0x1fe6\" profiledata=\"0x40000000\""; + private const string AddNpsString = "netsh nps add np name=\"\"{0}\"\" policysource=\"1\" processingorder=\"{1}\" conditionid=\"0x3d\" conditiondata=\"^5$\" conditionid=\"0x1fb5\" conditiondata=\"{2}\" conditionid=\"0x1fb4\" conditiondata=\"{3}\" conditionid=\"0x1e\" conditiondata=\"UserAuthType:(PW|CA)\" profileid=\"0x1005\" profiledata=\"TRUE\" profileid=\"0x100f\" profiledata=\"TRUE\" profileid=\"0x1009\" profiledata=\"0x7\" profileid=\"0x1fe6\" profiledata=\"0x40000000\""; #endregion #region Properties @@ -139,7 +139,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices #region RDS Collections - public bool CreateCollection(string organizationId, string tenantName, RdsCollection collection) + public bool CreateCollection(string organizationId, RdsCollection collection) { var result = true; @@ -194,13 +194,13 @@ namespace WebsitePanel.Providers.RemoteDesktopServices ActiveDirectoryUtils.CreateGroup(orgPath, GetUsersGroupName(collection.Name)); } - var policyName = GetPolicyName(tenantName, organizationId, collection.Name); + var policyName = GetPolicyName(organizationId, collection.Name); foreach (var gateway in Gateways) { if (!CentralNps) { - CreateRdCapForce(runSpace, gateway, policyName, new List { GetUsersGroupName(collection.Name) }); + CreateRdCapForce(runSpace, gateway, policyName, collection.Name, new List { GetUsersGroupName(collection.Name) }); } CreateRdRapForce(runSpace, gateway, policyName, collection.Name, new List { GetUsersGroupName(collection.Name) }); @@ -263,7 +263,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices return collection; } - public bool RemoveCollection(string organizationId, string tenantName, string collectionName) + public bool RemoveCollection(string organizationId, string collectionName) { var result = true; @@ -280,7 +280,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices ExecuteShellCommand(runSpace, cmd, false); - var policyName = GetPolicyName(tenantName, organizationId, collectionName); + var policyName = GetPolicyName(organizationId, collectionName); foreach (var gateway in Gateways) { @@ -549,11 +549,15 @@ namespace WebsitePanel.Providers.RemoteDesktopServices var count = showResult.Count(x => Convert.ToString(x).Contains("policy conf")) + 1001; - var groupAd = ActiveDirectoryUtils.GetADObject(GetUsersGroupPath(organizationId, collectionName)); + var userGroupAd = ActiveDirectoryUtils.GetADObject(GetUsersGroupPath(organizationId, collectionName)); - var sid = (byte[])ActiveDirectoryUtils.GetADObjectProperty(groupAd, "objectSid"); + var userGroupSid = (byte[])ActiveDirectoryUtils.GetADObjectProperty(userGroupAd, "objectSid"); - var addCmdString = string.Format(AddNpsString, policyName.Replace(" ", "_"), count, ConvertByteToStringSid(sid)); + var computerGroupAd = ActiveDirectoryUtils.GetADObject(GetComputerGroupPath(organizationId, collectionName)); + + var computerGroupSid = (byte[])ActiveDirectoryUtils.GetADObjectProperty(computerGroupAd, "objectSid"); + + var addCmdString = string.Format(AddNpsString, policyName.Replace(" ", "_"), count, ConvertByteToStringSid(userGroupSid), ConvertByteToStringSid(computerGroupSid)); Command addCmd = new Command(addCmdString); @@ -567,7 +571,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices var removeResult = ExecuteRemoteShellCommand(runSpace, centralNpshost, removeCmd); } - internal void CreateRdCapForce(Runspace runSpace, string gatewayHost, string policyName, List groups) + internal void CreateRdCapForce(Runspace runSpace, string gatewayHost, string policyName, string collectionName, List groups) { //New-Item -Path "RDS:\GatewayServer\CAP" -Name "Allow Admins" -UserGroups "Administrators@." -AuthMethod 1 //Set-Item -Path "RDS:\GatewayServer\CAP\Allow Admins\SessionTimeout" -Value 480 -SessionTimeoutAction 0 @@ -578,11 +582,13 @@ namespace WebsitePanel.Providers.RemoteDesktopServices } var userGroupParametr = string.Format("@({0})",string.Join(",", groups.Select(x => string.Format("\"{0}@{1}\"", x, RootDomain)).ToArray())); + var computerGroupParameter = string.Format("\"{0}@{1}\"", GetComputersGroupName(collectionName), RootDomain); Command rdCapCommand = new Command("New-Item"); rdCapCommand.Parameters.Add("Path", string.Format("\"{0}\"", CapPath)); rdCapCommand.Parameters.Add("Name", string.Format("\"{0}\"", policyName)); rdCapCommand.Parameters.Add("UserGroups", userGroupParametr); + rdCapCommand.Parameters.Add("ComputerGroups", computerGroupParameter); rdCapCommand.Parameters.Add("AuthMethod", 1); ExecuteRemoteShellCommand(runSpace, gatewayHost, rdCapCommand, RdsModuleName); @@ -930,9 +936,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices ExecuteRemoteShellCommand(runSpace, hostname, rdRapCommand, imports); } - private string GetPolicyName(string tenantName,string organizationId, string collectionName) + private string GetPolicyName(string organizationId, string collectionName) { - return string.Format("{0}-{1}-{2}", tenantName, organizationId, collectionName); + return string.Format("rds-{0}-{1}", organizationId, collectionName); } private string GetComputersGroupName(string collectionName) diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs index 24a78087..e3637eae 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs @@ -117,19 +117,17 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool CreateCollection(string organizationId, string tenantName, RdsCollection collection) { + public bool CreateCollection(string organizationId, RdsCollection collection) { object[] results = this.Invoke("CreateCollection", new object[] { organizationId, - tenantName, collection}); return ((bool)(results[0])); } /// - public System.IAsyncResult BeginCreateCollection(string organizationId, string tenantName, RdsCollection collection, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateCollection(string organizationId, RdsCollection collection, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CreateCollection", new object[] { organizationId, - tenantName, collection}, callback, asyncState); } @@ -140,18 +138,17 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { } /// - public void CreateCollectionAsync(string organizationId, string tenantName, RdsCollection collection) { - this.CreateCollectionAsync(organizationId, tenantName, collection, null); + public void CreateCollectionAsync(string organizationId, RdsCollection collection) { + this.CreateCollectionAsync(organizationId, collection, null); } /// - public void CreateCollectionAsync(string organizationId, string tenantName, RdsCollection collection, object userState) { + public void CreateCollectionAsync(string organizationId, RdsCollection collection, object userState) { if ((this.CreateCollectionOperationCompleted == null)) { this.CreateCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateCollectionOperationCompleted); } this.InvokeAsync("CreateCollection", new object[] { organizationId, - tenantName, collection}, this.CreateCollectionOperationCompleted, userState); } @@ -207,19 +204,17 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RemoveCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool RemoveCollection(string organizationId, string tenantName, string collectionName) { + public bool RemoveCollection(string organizationId, string collectionName) { object[] results = this.Invoke("RemoveCollection", new object[] { organizationId, - tenantName, collectionName}); return ((bool)(results[0])); } /// - public System.IAsyncResult BeginRemoveCollection(string organizationId, string tenantName, string collectionName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginRemoveCollection(string organizationId, string collectionName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("RemoveCollection", new object[] { organizationId, - tenantName, collectionName}, callback, asyncState); } @@ -230,18 +225,17 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { } /// - public void RemoveCollectionAsync(string organizationId, string tenantName, string collectionName) { - this.RemoveCollectionAsync(organizationId, tenantName, collectionName, null); + public void RemoveCollectionAsync(string organizationId, string collectionName) { + this.RemoveCollectionAsync(organizationId, collectionName, null); } /// - public void RemoveCollectionAsync(string organizationId, string tenantName, string collectionName, object userState) { + public void RemoveCollectionAsync(string organizationId, string collectionName, object userState) { if ((this.RemoveCollectionOperationCompleted == null)) { this.RemoveCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveCollectionOperationCompleted); } this.InvokeAsync("RemoveCollection", new object[] { organizationId, - tenantName, collectionName}, this.RemoveCollectionOperationCompleted, userState); } diff --git a/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs index b7e4d7a7..0bb0fb26 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs @@ -60,12 +60,12 @@ namespace WebsitePanel.Server } [WebMethod, SoapHeader("settings")] - public bool CreateCollection(string organizationId, string tenantName, RdsCollection collection) + public bool CreateCollection(string organizationId, RdsCollection collection) { try { Log.WriteStart("'{0}' CreateCollection", ProviderSettings.ProviderName); - var result = RDSProvider.CreateCollection(organizationId, tenantName, collection); + var result = RDSProvider.CreateCollection(organizationId, collection); Log.WriteEnd("'{0}' CreateCollection", ProviderSettings.ProviderName); return result; } @@ -94,12 +94,12 @@ namespace WebsitePanel.Server } [WebMethod, SoapHeader("settings")] - public bool RemoveCollection(string organizationId, string tenantName, string collectionName) + public bool RemoveCollection(string organizationId, string collectionName) { try { Log.WriteStart("'{0}' RemoveCollection", ProviderSettings.ProviderName); - var result = RDSProvider.RemoveCollection(organizationId, tenantName, collectionName); + var result = RDSProvider.RemoveCollection(organizationId, collectionName); Log.WriteEnd("'{0}' RemoveCollection", ProviderSettings.ProviderName); return result; } From 399b24c7ce8f56ad65efdb3a7721b49c34205add Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Wed, 19 Nov 2014 15:30:39 +0300 Subject: [PATCH 14/42] 1)remove a RDS server form org - add check if server is in collection 2)RDS add server in colection - can add only servers witch are not in other collection. --- .../RemoteDesktopServicesController.cs | 2 +- .../WebsitePanel_SharedResources.ascx.resx | 3 +++ .../WebsitePanel/RDS/AssignedRDSServers.ascx.cs | 8 ++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs index f2a3ca42..9371ca1e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs @@ -422,7 +422,7 @@ namespace WebsitePanel.EnterpriseServer private static RdsServersPaged GetOrganizationRdsServersPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { - DataSet ds = DataProvider.GetRDSServersPaged(itemId, null, filterColumn, filterValue, sortColumn, startRow, maximumRows, ignoreRdsCollectionId: true); + DataSet ds = DataProvider.GetRDSServersPaged(itemId, null, filterColumn, filterValue, sortColumn, startRow, maximumRows); RdsServersPaged result = new RdsServersPaged(); result.RecordsCount = (int)ds.Tables[0].Rows[0][0]; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx index f7a9f87f..7508ff20 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -5593,4 +5593,7 @@ Error creating rds collection. You need to add at least 1 rds server to collection + + Error deleting rds server from organization: server is used in rds collection + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx.cs index af6144d6..906f8182 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx.cs @@ -32,6 +32,7 @@ using WebsitePanel.EnterpriseServer; using WebsitePanel.Providers.Common; using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.OS; +using WebsitePanel.Providers.RemoteDesktopServices; using WebsitePanel.WebPortal; namespace WebsitePanel.Portal.RDS @@ -67,6 +68,13 @@ namespace WebsitePanel.Portal.RDS try { + RdsServer rdsServer = ES.Services.RDS.GetRdsServer(rdsServerId); + if (rdsServer.RdsCollectionId != null) + { + messageBox.ShowErrorMessage("RDS_UNASSIGN_SERVER_FROM_ORG_SERVER_IS_IN_COLLECTION"); + return; + } + ResultObject result = ES.Services.RDS.RemoveRdsServerFromOrganization(rdsServerId); if (!result.IsSuccess) { From d5bf70596d7081fdeb69d76be2a270675f087a88 Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Thu, 20 Nov 2014 16:14:42 +0300 Subject: [PATCH 15/42] fix bugs - add processings. --- .../WebsitePanel/RDS/RDSCreateCollection.ascx | 4 ++-- .../App_LocalResources/RDSCollectionApps.ascx.resx | 9 +++++++++ .../App_LocalResources/RDSCollectionServers.ascx.resx | 9 +++++++++ .../RDS/UserControls/RDSCollectionServers.ascx | 2 +- .../RDS/UserControls/RDSCollectionServers.ascx.cs | 5 ++--- .../DesktopModules/WebsitePanel/Scripts/AjaxUtils.js | 8 +++++++- 6 files changed, 30 insertions(+), 7 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx index 7047502f..a90b852a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx @@ -24,7 +24,7 @@
+
-
- +
@@ -37,7 +37,7 @@
- +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionApps.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionApps.ascx.resx index aebc0900..0adb8a73 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionApps.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionApps.ascx.resx @@ -117,12 +117,21 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ShowProgressDialog('Getting Remote Apps ...'); + Add... + + CloseProgressDialog(); + Add Apps + + CloseProgressDialog(); + Cancel diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionServers.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionServers.ascx.resx index 814527a9..58c6ab6f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionServers.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionServers.ascx.resx @@ -117,12 +117,21 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ShowProgressDialog('Getting RDS Servers ...'); + Add... + + CloseProgressDialog(); + Add Servers + + CloseProgressDialog(); + Cancel diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionServers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionServers.ascx index 272374a6..84ee87c1 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionServers.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionServers.ascx @@ -94,7 +94,7 @@
- - - - -
@@ -52,4 +43,33 @@
+ + + +
+ + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.cs index 0eaea7f4..2a5aa27b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.cs @@ -27,6 +27,8 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using System; +using System.Collections.Generic; +using System.Web.UI.WebControls; using WebsitePanel.EnterpriseServer; using WebsitePanel.Providers.Common; @@ -39,10 +41,26 @@ namespace WebsitePanel.Portal.ProviderControls } + public string GWServers + { + get + { + return ViewState["GWServers"] != null ? ViewState["GWServers"].ToString() : string.Empty; + } + set + { + ViewState["GWServers"] = value; + } + } + public void BindSettings(System.Collections.Specialized.StringDictionary settings) { txtConnectionBroker.Text = settings["ConnectionBroker"]; - txtGateway.Text = settings["GWServrsList"]; + + GWServers = settings["GWServrsList"]; + + UpdateLyncServersGrid(); + txtRootOU.Text = settings["RootOU"]; txtPrimaryDomainController.Text = settings["PrimaryDomainController"]; @@ -63,11 +81,12 @@ namespace WebsitePanel.Portal.ProviderControls public void SaveSettings(System.Collections.Specialized.StringDictionary settings) { settings["ConnectionBroker"] = txtConnectionBroker.Text; - settings["GWServrsList"] = txtGateway.Text; settings["RootOU"] = txtRootOU.Text; settings["PrimaryDomainController"] = txtPrimaryDomainController.Text; settings["UseCentralNPS"] = chkUseCentralNPS.Checked.ToString(); settings["CentralNPS"] = chkUseCentralNPS.Checked ? txtCentralNPS.Text : string.Empty; + + settings["GWServrsList"] = GWServers; } protected void chkUseCentralNPS_CheckedChanged(object sender, EventArgs e) @@ -75,6 +94,61 @@ namespace WebsitePanel.Portal.ProviderControls txtCentralNPS.Enabled = chkUseCentralNPS.Checked; txtCentralNPS.Text = chkUseCentralNPS.Checked ? txtCentralNPS.Text : string.Empty; } - + + protected void btnAddGWServer_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(GWServers)) + GWServers += ";"; + + GWServers += txtAddGWServer.Text; + + txtAddGWServer.Text = string.Empty; + + UpdateLyncServersGrid(); + } + + public List GetServices(string data) + { + if (string.IsNullOrEmpty(data)) + return null; + List list = new List(); + string[] serversNames = data.Split(';'); + foreach (string current in serversNames) + { + list.Add(new GWServer { ServerName = current }); + } + + return list; + } + + private void UpdateLyncServersGrid() + { + gvGWServers.DataSource = GetServices(GWServers); + gvGWServers.DataBind(); + } + + protected void gvGWServers_RowCommand(object sender, GridViewCommandEventArgs e) + { + if (e.CommandName == "RemoveServer") + { + string str = string.Empty; + List servers = GetServices(GWServers); + foreach (GWServer current in servers) + { + if (current.ServerName == e.CommandArgument.ToString()) + continue; + + str += current.ServerName + ";"; + } + + GWServers = str.TrimEnd(';'); + UpdateLyncServersGrid(); + } + } + } + + public class GWServer + { + public string ServerName { get; set; } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.designer.cs index e3f1f911..e1c47f7a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.designer.cs @@ -39,33 +39,6 @@ namespace WebsitePanel.Portal.ProviderControls { /// protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator2; - /// - /// lblGateway control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblGateway; - - /// - /// txtGateway control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox txtGateway; - - /// - /// RequiredFieldValidator3 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator3; - /// /// lblRootOU control. /// @@ -155,5 +128,41 @@ namespace WebsitePanel.Portal.ProviderControls { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtCentralNPS; + + /// + /// locGWServers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locGWServers; + + /// + /// txtAddGWServer control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtAddGWServer; + + /// + /// btnAddGWServer control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnAddGWServer; + + /// + /// gvGWServers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView gvGWServers; } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj index 22deb551..9d85192e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj @@ -5535,6 +5535,7 @@ + Designer From 6b836fc9f605d10c74a89236060623cee867e22c Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Fri, 21 Nov 2014 03:46:01 -0800 Subject: [PATCH 19/42] Assigned RDS Servers fixes --- .../RemoteDesktopServices/RemoteDesktopServicesController.cs | 2 +- .../DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx | 3 ++- .../WebsitePanel/RDS/UserControls/RDSCollectionServers.ascx.cs | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs index 9371ca1e..f2a3ca42 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs @@ -422,7 +422,7 @@ namespace WebsitePanel.EnterpriseServer private static RdsServersPaged GetOrganizationRdsServersPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { - DataSet ds = DataProvider.GetRDSServersPaged(itemId, null, filterColumn, filterValue, sortColumn, startRow, maximumRows); + DataSet ds = DataProvider.GetRDSServersPaged(itemId, null, filterColumn, filterValue, sortColumn, startRow, maximumRows, ignoreRdsCollectionId: true); RdsServersPaged result = new RdsServersPaged(); result.RecordsCount = (int)ds.Tables[0].Rows[0][0]; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx index eab349e5..c1956968 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx @@ -55,9 +55,10 @@ - + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionServers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionServers.ascx.cs index 6fb8d5f8..b3ca3c35 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionServers.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionServers.ascx.cs @@ -131,6 +131,7 @@ namespace WebsitePanel.Portal.RDS.UserControls servers.AddRange(GetGridViewServers(SelectedState.All)); // add new servers + if (newServers != null) { foreach (RdsServer newServer in newServers) From fd023a347d0a6559be989bb96d7335daaafcb199 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sat, 22 Nov 2014 18:22:26 -0500 Subject: [PATCH 20/42] Added tag build-2.1.0.469 for changeset f81524a8881e From ac3d594fbdc852a11ad1997bffcccbf88f5345ae Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Wed, 26 Nov 2014 17:31:04 +0400 Subject: [PATCH 21/42] Exchange Shared and Resource mailboxes --- WebsitePanel/Database/update_db.sql | 69 +++++++++++++++++++ .../Packages/Quotas.cs | 3 + .../ExchangeServerController.cs | 26 ++++++- .../HostedSolution/ExchangeAccountType.cs | 5 +- .../HostedSolution/OrganizationStatistics.cs | 30 ++++++++ .../Exchange2013.cs | 5 ++ .../Exchange2010SP2.cs | 4 ++ .../WebsitePanel_SharedResources.ascx.resx | 13 +++- .../ExchangeCreateMailbox.ascx.resx | 6 ++ .../ExchangeCreateMailbox.ascx.cs | 14 ++++ .../ExchangeMailboxGeneralSettings.ascx.cs | 6 ++ .../ExchangeMailboxPermissions.ascx.cs | 10 +++ .../ExchangeServer/ExchangeMailboxes.ascx | 3 + .../ExchangeServer/ExchangeMailboxes.ascx.cs | 24 +++++++ .../ExchangeMailboxes.ascx.designer.cs | 27 ++++++++ 15 files changed, 239 insertions(+), 6 deletions(-) diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index 355e1325..a339dd9c 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -6082,3 +6082,72 @@ set PropertyValue='%PROGRAMFILES(x86)%\PHP\php.exe' where PropertyName='Php4Path' and ProviderId in(101, 105) GO + +-- Exchange2013 Shared and resource mailboxes + +-- Exchange2013 Shared and resource mailboxes Quotas + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2013.SharedMailboxes') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) +VALUES (427, 12, 30, N'Exchange2013.SharedMailboxes', N'Shared Mailboxes per Organization', 2, 0, NULL, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2013.ResourceMailboxes') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) +VALUES (428, 12, 31, N'Exchange2013.ResourceMailboxes', N'Resource Mailboxes per Organization', 2, 0, NULL, NULL) +END +GO + +-- Exchange2013 Shared and resource mailboxes Organization statistics + +ALTER PROCEDURE [dbo].[GetExchangeOrganizationStatistics] +( + @ItemID int +) +AS + +DECLARE @ARCHIVESIZE INT +IF -1 in (SELECT B.ArchiveSizeMB FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) +BEGIN + SET @ARCHIVESIZE = -1 +END +ELSE +BEGIN + SET @ARCHIVESIZE = (SELECT SUM(B.ArchiveSizeMB) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) +END + +IF -1 IN (SELECT B.MailboxSizeMB FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) +BEGIN +SELECT + (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1 OR AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedMailboxes, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 10) AND ItemID = @ItemID) AS CreatedSharedMailboxes, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 11) AND ItemID = @ItemID) AS CreatedResourceMailboxes, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 2 AND ItemID = @ItemID) AS CreatedContacts, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 3 AND ItemID = @ItemID) AS CreatedDistributionLists, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 4 AND ItemID = @ItemID) AS CreatedPublicFolders, + (SELECT COUNT(*) FROM ExchangeOrganizationDomains WHERE ItemID = @ItemID) AS CreatedDomains, + (SELECT MIN(B.MailboxSizeMB) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedDiskSpace, + (SELECT MIN(B.RecoverableItemsSpace) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedLitigationHoldSpace, + @ARCHIVESIZE AS UsedArchingStorage +END +ELSE +BEGIN +SELECT + (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1 OR AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedMailboxes, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 10) AND ItemID = @ItemID) AS CreatedSharedMailboxes, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 11) AND ItemID = @ItemID) AS CreatedResourceMailboxes, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 2 AND ItemID = @ItemID) AS CreatedContacts, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 3 AND ItemID = @ItemID) AS CreatedDistributionLists, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 4 AND ItemID = @ItemID) AS CreatedPublicFolders, + (SELECT COUNT(*) FROM ExchangeOrganizationDomains WHERE ItemID = @ItemID) AS CreatedDomains, + (SELECT SUM(B.MailboxSizeMB) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedDiskSpace, + (SELECT SUM(B.RecoverableItemsSpace) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedLitigationHoldSpace, + @ARCHIVESIZE AS UsedArchingStorage +END + + +RETURN +GO diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs index 1d2702c2..2c3ec20d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs @@ -123,6 +123,9 @@ order by rg.groupOrder public const string EXCHANGE2013_ARCHIVINGSTORAGE = "Exchange2013.ArchivingStorage"; // Archiving public const string EXCHANGE2013_ARCHIVINGMAILBOXES = "Exchange2013.ArchivingMailboxes"; + public const string EXCHANGE2013_SHAREDMAILBOXES = "Exchange2013.SharedMailboxes"; // Shared and resource mailboxes + public const string EXCHANGE2013_RESOURCEMAILBOXES = "Exchange2013.ResourceMailboxes"; + public const string MSSQL2000_DATABASES = "MsSQL2000.Databases"; // Databases public const string MSSQL2000_USERS = "MsSQL2000.Users"; // Users public const string MSSQL2000_MAXDATABASESIZE = "MsSQL2000.MaxDatabaseSize"; // Max Database Size diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs index d0e48fee..36fc7ed3 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs @@ -193,6 +193,9 @@ namespace WebsitePanel.EnterpriseServer stats.UsedDiskSpace = tempStats.UsedDiskSpace; stats.UsedLitigationHoldSpace = tempStats.UsedLitigationHoldSpace; stats.UsedArchingStorage = tempStats.UsedArchingStorage; + + stats.CreatedSharedMailboxes = tempStats.CreatedSharedMailboxes; + stats.CreatedResourceMailboxes = tempStats.CreatedResourceMailboxes; } else { @@ -221,6 +224,9 @@ namespace WebsitePanel.EnterpriseServer stats.UsedDiskSpace += tempStats.UsedDiskSpace; stats.UsedLitigationHoldSpace += tempStats.UsedLitigationHoldSpace; stats.UsedArchingStorage += tempStats.UsedArchingStorage; + + stats.CreatedSharedMailboxes += tempStats.CreatedSharedMailboxes; + stats.CreatedResourceMailboxes += tempStats.CreatedResourceMailboxes; } } } @@ -241,6 +247,9 @@ namespace WebsitePanel.EnterpriseServer stats.AllocatedLitigationHoldSpace = cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue; stats.AllocatedArchingStorage = cntx.Quotas[Quotas.EXCHANGE2013_ARCHIVINGSTORAGE].QuotaAllocatedValue; + stats.AllocatedSharedMailboxes = cntx.Quotas[Quotas.EXCHANGE2013_SHAREDMAILBOXES].QuotaAllocatedValue; + stats.AllocatedResourceMailboxes = cntx.Quotas[Quotas.EXCHANGE2013_RESOURCEMAILBOXES].QuotaAllocatedValue; + return stats; } catch (Exception ex) @@ -1665,8 +1674,21 @@ namespace WebsitePanel.EnterpriseServer // check mailbox quota OrganizationStatistics orgStats = GetOrganizationStatistics(itemId); - if ((orgStats.AllocatedMailboxes > -1) && (orgStats.CreatedMailboxes >= orgStats.AllocatedMailboxes)) - return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT; + if (accountType == ExchangeAccountType.SharedMailbox) + { + if ((orgStats.AllocatedSharedMailboxes > -1) && (orgStats.CreatedSharedMailboxes >= orgStats.AllocatedSharedMailboxes)) + return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT; + } + else if (accountType == ExchangeAccountType.ResourceMailbox) + { + if ((orgStats.AllocatedResourceMailboxes > -1) && (orgStats.CreatedResourceMailboxes >= orgStats.AllocatedResourceMailboxes)) + return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT; + } + else + { + if ((orgStats.AllocatedMailboxes > -1) && (orgStats.CreatedMailboxes >= orgStats.AllocatedMailboxes)) + return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT; + } // place log record diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs index 88b0ac93..23ff9cf6 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs @@ -39,7 +39,8 @@ namespace WebsitePanel.Providers.HostedSolution Equipment = 6, User = 7, SecurityGroup = 8, - DefaultSecurityGroup = 9 - + DefaultSecurityGroup = 9, + SharedMailbox = 10, + ResourceMailbox = 11 } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatistics.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatistics.cs index b8189f82..6d15b8e2 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatistics.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatistics.cs @@ -341,6 +341,36 @@ namespace WebsitePanel.Providers.HostedSolution get { return usedArchingStorage; } set { usedArchingStorage = value; } } + + int allocatedSharedMailboxes; + public int AllocatedSharedMailboxes + { + get { return allocatedSharedMailboxes; } + set { allocatedSharedMailboxes = value; } + } + + int createdSharedMailboxes; + public int CreatedSharedMailboxes + { + get { return createdSharedMailboxes; } + set { createdSharedMailboxes = value; } + } + + int allocatedResourceMailboxes; + public int AllocatedResourceMailboxes + { + get { return allocatedResourceMailboxes; } + set { allocatedResourceMailboxes = value; } + } + + int createdResourceMailboxes; + public int CreatedResourceMailboxes + { + get { return createdResourceMailboxes; } + set { createdResourceMailboxes = value; } + } + + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs index f318fe29..efb94b97 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs @@ -1942,6 +1942,11 @@ namespace WebsitePanel.Providers.HostedSolution cmd.Parameters.Add("Equipment"); else if (accountType == ExchangeAccountType.Room) cmd.Parameters.Add("Room"); + else if (accountType == ExchangeAccountType.SharedMailbox) + cmd.Parameters.Add("Shared"); + else if (accountType == ExchangeAccountType.ResourceMailbox) + cmd.Parameters.Add("Equipment"); + result = ExecuteShellCommand(runSpace, cmd); diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs index fbb33f3a..c39bdbe0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs @@ -369,6 +369,10 @@ namespace WebsitePanel.Providers.HostedSolution cmd.Parameters.Add("Equipment"); else if (accountType == ExchangeAccountType.Room) cmd.Parameters.Add("Room"); + else if (accountType == ExchangeAccountType.SharedMailbox) + cmd.Parameters.Add("Shared"); + else if (accountType == ExchangeAccountType.ResourceMailbox) + cmd.Parameters.Add("Equipment"); result = ExecuteShellCommand(runSpace, cmd); diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx index 7508ff20..e55192d1 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -5593,7 +5593,16 @@ Error creating rds collection. You need to add at least 1 rds server to collection - - Error deleting rds server from organization: server is used in rds collection + + Resource Mailboxes per Organization + + + Shared Mailboxes per Organization + + + (resource mailbox) + + + (shared mailbox) \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeCreateMailbox.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeCreateMailbox.ascx.resx index a00e1a83..bf6cdd21 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeCreateMailbox.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeCreateMailbox.ascx.resx @@ -186,4 +186,10 @@ * + + Resource Mailbox + + + Shared Mailbox + \ No newline at end of file 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 b91a1f73..68da7689 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs @@ -101,6 +101,20 @@ namespace WebsitePanel.Portal.ExchangeServer } } + if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2013_SHAREDMAILBOXES)) + { + if (cntx.Quotas[Quotas.EXCHANGE2013_SHAREDMAILBOXES].QuotaAllocatedValue != 0) + rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("SharedMailbox.Text"), "10")); + + } + + if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2013_RESOURCEMAILBOXES)) + { + if (cntx.Quotas[Quotas.EXCHANGE2013_RESOURCEMAILBOXES].QuotaAllocatedValue != 0) + rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("ResourceMailbox.Text"), "11")); + + } + rowRetentionPolicy.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, cntx); } 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 d79d614f..39541c59 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs @@ -183,6 +183,12 @@ namespace WebsitePanel.Portal.ExchangeServer } imgVipUser.Visible = account.IsVIP && Cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels); + if (account.AccountType == ExchangeAccountType.SharedMailbox) + litDisplayName.Text += GetSharedLocalizedString("SharedMailbox.Text"); + + if (account.AccountType == ExchangeAccountType.ResourceMailbox) + litDisplayName.Text += GetSharedLocalizedString("ResourceMailbox.Text"); + } catch (Exception ex) { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs index 171f26cd..ae3449bf 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs @@ -67,6 +67,16 @@ namespace WebsitePanel.Portal.ExchangeServer litDisplayName.Text = mailbox.DisplayName; sendAsPermission.SetAccounts(mailbox.SendAsAccounts); fullAccessPermission.SetAccounts(mailbox.FullAccessAccounts); + + // get account meta + ExchangeAccount account = ES.Services.ExchangeServer.GetAccount(PanelRequest.ItemID, PanelRequest.AccountID); + + if (account.AccountType == ExchangeAccountType.SharedMailbox) + litDisplayName.Text += GetSharedLocalizedString("SharedMailbox.Text"); + + if (account.AccountType == ExchangeAccountType.ResourceMailbox) + litDisplayName.Text += GetSharedLocalizedString("ResourceMailbox.Text"); + } catch (Exception ex) { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx index 40852b11..47b87af2 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx @@ -25,6 +25,9 @@
+ + + 10 diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.cs index 1874f821..80682fe2 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.cs @@ -60,6 +60,10 @@ namespace WebsitePanel.Portal.ExchangeServer if (!IsPostBack) { + chkMailboxes.Checked = true; + chkResourceMailboxes.Checked = true; + chkSharedMailboxes.Checked = true; + BindStats(); } @@ -246,5 +250,25 @@ namespace WebsitePanel.Portal.ExchangeServer return serviceLevel; } + + protected void chkMailboxes_CheckedChanged(object sender, EventArgs e) + { + List accountTypes = new List(); + + if ((!chkMailboxes.Checked)&&(!chkSharedMailboxes.Checked)&&(!chkResourceMailboxes.Checked)) + chkMailboxes.Checked = true; + + if (chkMailboxes.Checked) + accountTypes.AddRange(new string[] {"1","5","6"}); + + if (chkSharedMailboxes.Checked) + accountTypes.Add("10"); + + if (chkResourceMailboxes.Checked) + accountTypes.Add("11"); + + odsAccountsPaged.SelectParameters["accountTypes"].DefaultValue = string.Join(",", accountTypes); + } + } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.designer.cs index 6e9b50b4..1bde4051 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.designer.cs @@ -66,6 +66,33 @@ namespace WebsitePanel.Portal.ExchangeServer { /// protected global::System.Web.UI.WebControls.Panel SearchPanel; + /// + /// chkMailboxes control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkMailboxes; + + /// + /// chkResourceMailboxes control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkResourceMailboxes; + + /// + /// chkSharedMailboxes control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkSharedMailboxes; + /// /// ddlPageSize control. /// From 97f4ca1d3c40e0f2ac462b3fb83b08abb38e7e04 Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Wed, 26 Nov 2014 18:06:44 +0400 Subject: [PATCH 22/42] Exchange Shared and Resource mailboxes fix --- .../ExchangeServer/ExchangeMailboxes.ascx | 2 +- .../ExchangeServer/OrganizationHome.ascx | 18 ++++++++++ .../ExchangeServer/OrganizationHome.ascx.cs | 15 ++++++++ .../OrganizationHome.ascx.designer.cs | 36 +++++++++++++++++++ 4 files changed, 70 insertions(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx index 47b87af2..53fc882f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx @@ -108,7 +108,7 @@ OnSelected="odsAccountsPaged_Selected"> - + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx index 9f9e8388..2817164c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx @@ -89,6 +89,24 @@ + + + + + + + + + + + + + + + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.cs index 1bc84bc7..1de0159c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.cs @@ -54,6 +54,14 @@ namespace WebsitePanel.Portal.ExchangeServer lnkMailboxes.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "mailboxes", "SpaceID=" + PanelSecurity.PackageId.ToString()); + + lnkSharedMailboxes.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "mailboxes", + "SpaceID=" + PanelSecurity.PackageId.ToString()); + + lnkResourceMailboxes.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "mailboxes", + "SpaceID=" + PanelSecurity.PackageId.ToString()); + + lnkContacts.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "contacts", "SpaceID=" + PanelSecurity.PackageId.ToString()); @@ -77,6 +85,13 @@ namespace WebsitePanel.Portal.ExchangeServer mailboxesStats.QuotaValue = exchangeOrgStats.AllocatedMailboxes; if (exchangeOrgStats.AllocatedMailboxes != -1) mailboxesStats.QuotaAvailable = exchangeTenantStats.AllocatedMailboxes - exchangeTenantStats.CreatedMailboxes; + mailboxesSharedStats.QuotaUsedValue = exchangeOrgStats.CreatedSharedMailboxes; + mailboxesSharedStats.QuotaValue = exchangeOrgStats.AllocatedSharedMailboxes; + if (exchangeOrgStats.AllocatedSharedMailboxes != -1) mailboxesSharedStats.QuotaAvailable = exchangeTenantStats.AllocatedSharedMailboxes - exchangeTenantStats.CreatedSharedMailboxes; + + mailboxesResourceStats.QuotaUsedValue = exchangeOrgStats.CreatedResourceMailboxes; + mailboxesResourceStats.QuotaValue = exchangeOrgStats.AllocatedResourceMailboxes; + if (exchangeOrgStats.AllocatedResourceMailboxes != -1) mailboxesResourceStats.QuotaAvailable = exchangeTenantStats.AllocatedResourceMailboxes - exchangeTenantStats.CreatedResourceMailboxes; if (exchangeTenantStats.AllocatedContacts == 0) this.rowContacts.Style.Add("display", "none"); else diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.designer.cs index 062c57df..2a160e51 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationHome.ascx.designer.cs @@ -201,6 +201,42 @@ namespace WebsitePanel.Portal.ExchangeServer { /// protected global::WebsitePanel.Portal.QuotaViewer mailboxesStats; + /// + /// lnkSharedMailboxes control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HyperLink lnkSharedMailboxes; + + /// + /// mailboxesSharedStats control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.QuotaViewer mailboxesSharedStats; + + /// + /// lnkResourceMailboxes control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HyperLink lnkResourceMailboxes; + + /// + /// mailboxesResourceStats control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.QuotaViewer mailboxesResourceStats; + /// /// rowContacts control. /// From 074c1f06ba95d50cb6e812cbc5f5d094be3adff6 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Wed, 26 Nov 2014 10:23:00 -0500 Subject: [PATCH 23/42] Added tag build-2.1.0.470 for changeset e19f55e1815a From f54b1b84661934f029a58f60b533a25c02e8e06d Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Thu, 27 Nov 2014 01:09:56 +0400 Subject: [PATCH 24/42] Exchange Shared and Resource mailboxes : db update fix --- WebsitePanel/Database/update_db.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index a339dd9c..406cde00 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -6090,7 +6090,7 @@ GO IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2013.SharedMailboxes') BEGIN INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) -VALUES (427, 12, 30, N'Exchange2013.SharedMailboxes', N'Shared Mailboxes per Organization', 2, 0, NULL, NULL) +VALUES (429, 12, 30, N'Exchange2013.SharedMailboxes', N'Shared Mailboxes per Organization', 2, 0, NULL, NULL) END GO From 6b48a2412dee3981e470495c34b5da3816670250 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Wed, 26 Nov 2014 17:33:35 -0500 Subject: [PATCH 25/42] Added tag build-2.1.0.471 for changeset 79f591c9bd09 From b4ce9904b400d4628865f216e37ffaf6877aa375 Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Thu, 27 Nov 2014 19:10:06 +0400 Subject: [PATCH 26/42] Exchange Shared and Resource mailboxes : AccountType fix --- WebsitePanel/Database/update_db.sql | 8 +++--- .../ExchangeServerController.cs | 2 +- .../HostedSolution/ExchangeAccountType.cs | 3 +-- .../Exchange2013.cs | 2 -- .../Exchange2010SP2.cs | 2 -- .../WebsitePanel_SharedResources.ascx.resx | 7 +++-- .../Default/Images/Exchange/shared_16.gif | Bin 0 -> 226 bytes .../ExchangeCreateMailbox.ascx.resx | 3 --- .../ExchangeCreateMailbox.ascx.cs | 25 +++++++++++------- .../ExchangeMailboxGeneralSettings.ascx.cs | 7 +++-- .../ExchangeMailboxPermissions.ascx.cs | 7 +++-- .../ExchangeServer/ExchangeMailboxes.ascx | 2 +- .../ExchangeServer/ExchangeMailboxes.ascx.cs | 7 +++-- 13 files changed, 43 insertions(+), 32 deletions(-) create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/Exchange/shared_16.gif diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index 406cde00..69079c48 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -6122,9 +6122,9 @@ END IF -1 IN (SELECT B.MailboxSizeMB FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) BEGIN SELECT - (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1 OR AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedMailboxes, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1) AND ItemID = @ItemID) AS CreatedMailboxes, (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 10) AND ItemID = @ItemID) AS CreatedSharedMailboxes, - (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 11) AND ItemID = @ItemID) AS CreatedResourceMailboxes, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedResourceMailboxes, (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 2 AND ItemID = @ItemID) AS CreatedContacts, (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 3 AND ItemID = @ItemID) AS CreatedDistributionLists, (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 4 AND ItemID = @ItemID) AS CreatedPublicFolders, @@ -6136,9 +6136,9 @@ END ELSE BEGIN SELECT - (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1 OR AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedMailboxes, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1) AND ItemID = @ItemID) AS CreatedMailboxes, (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 10) AND ItemID = @ItemID) AS CreatedSharedMailboxes, - (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 11) AND ItemID = @ItemID) AS CreatedResourceMailboxes, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedResourceMailboxes, (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 2 AND ItemID = @ItemID) AS CreatedContacts, (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 3 AND ItemID = @ItemID) AS CreatedDistributionLists, (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 4 AND ItemID = @ItemID) AS CreatedPublicFolders, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs index 36fc7ed3..df7c368a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs @@ -1679,7 +1679,7 @@ namespace WebsitePanel.EnterpriseServer if ((orgStats.AllocatedSharedMailboxes > -1) && (orgStats.CreatedSharedMailboxes >= orgStats.AllocatedSharedMailboxes)) return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT; } - else if (accountType == ExchangeAccountType.ResourceMailbox) + else if ((accountType == ExchangeAccountType.Room) || (accountType == ExchangeAccountType.Equipment)) { if ((orgStats.AllocatedResourceMailboxes > -1) && (orgStats.CreatedResourceMailboxes >= orgStats.AllocatedResourceMailboxes)) return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT; diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs index 23ff9cf6..fdeaa6f2 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs @@ -40,7 +40,6 @@ namespace WebsitePanel.Providers.HostedSolution User = 7, SecurityGroup = 8, DefaultSecurityGroup = 9, - SharedMailbox = 10, - ResourceMailbox = 11 + SharedMailbox = 10 } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs index efb94b97..01909d57 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Exchange2013/Exchange2013.cs @@ -1944,8 +1944,6 @@ namespace WebsitePanel.Providers.HostedSolution cmd.Parameters.Add("Room"); else if (accountType == ExchangeAccountType.SharedMailbox) cmd.Parameters.Add("Shared"); - else if (accountType == ExchangeAccountType.ResourceMailbox) - cmd.Parameters.Add("Equipment"); result = ExecuteShellCommand(runSpace, cmd); diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs index c39bdbe0..7ab55d2e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs @@ -371,8 +371,6 @@ namespace WebsitePanel.Providers.HostedSolution cmd.Parameters.Add("Room"); else if (accountType == ExchangeAccountType.SharedMailbox) cmd.Parameters.Add("Shared"); - else if (accountType == ExchangeAccountType.ResourceMailbox) - cmd.Parameters.Add("Equipment"); result = ExecuteShellCommand(runSpace, cmd); diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx index e55192d1..175a1e7d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -5599,10 +5599,13 @@ Shared Mailboxes per Organization - - (resource mailbox) + + (room mailbox) (shared mailbox) + + (equipment mailbox) + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/Exchange/shared_16.gif b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/Exchange/shared_16.gif new file mode 100644 index 0000000000000000000000000000000000000000..17af30c4d8911569fe69630f42df4aeb66833f24 GIT binary patch literal 226 zcmZ?wbhEHb6krfwI3mEHpr9ZiAaMWw{rB(RpFe+o{rdI&{rv?61qlfW0RaK?=g&7V zFmP~i*uQ^&eSJLx1H=FS|A8d&K=CIFBLmPX9gr4~oeZq;3Mzdmne#MO8u(cWbvA5S zE@acd#CzJ)rtxqt1LGW?ezqka12}}#k0*ce(BV=$9`GeWq)7G9S%$(GMSrQ2Jds-@ k3hsI^Sm;RPHC(!qpt_5XGfRb;x2>I*Nw2#{MUlZ80CkpKVy literal 0 HcmV?d00001 diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeCreateMailbox.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeCreateMailbox.ascx.resx index bf6cdd21..0d07fca4 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeCreateMailbox.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeCreateMailbox.ascx.resx @@ -186,9 +186,6 @@ * - - Resource Mailbox - Shared Mailbox 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 68da7689..fb1e73da 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs @@ -91,29 +91,36 @@ namespace WebsitePanel.Portal.ExchangeServer if (plans.Length == 0) btnCreate.Enabled = false; + bool allowResourceMailbox = false; + if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER)) { 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")); + allowResourceMailbox = true; } } + if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2013_RESOURCEMAILBOXES)) + { + if (cntx.Quotas[Quotas.EXCHANGE2013_RESOURCEMAILBOXES].QuotaAllocatedValue != 0) + allowResourceMailbox = true; + } + + + if (allowResourceMailbox) + { + 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")); + } + if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2013_SHAREDMAILBOXES)) { if (cntx.Quotas[Quotas.EXCHANGE2013_SHAREDMAILBOXES].QuotaAllocatedValue != 0) rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("SharedMailbox.Text"), "10")); - } - if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2013_RESOURCEMAILBOXES)) - { - if (cntx.Quotas[Quotas.EXCHANGE2013_RESOURCEMAILBOXES].QuotaAllocatedValue != 0) - rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("ResourceMailbox.Text"), "11")); - - } rowRetentionPolicy.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, cntx); } 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 39541c59..edc9b2ec 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs @@ -186,8 +186,11 @@ namespace WebsitePanel.Portal.ExchangeServer if (account.AccountType == ExchangeAccountType.SharedMailbox) litDisplayName.Text += GetSharedLocalizedString("SharedMailbox.Text"); - if (account.AccountType == ExchangeAccountType.ResourceMailbox) - litDisplayName.Text += GetSharedLocalizedString("ResourceMailbox.Text"); + if (account.AccountType == ExchangeAccountType.Room) + litDisplayName.Text += GetSharedLocalizedString("RoomMailbox.Text"); + + if (account.AccountType == ExchangeAccountType.Equipment) + litDisplayName.Text += GetSharedLocalizedString("EquipmentMailbox.Text"); } catch (Exception ex) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs index ae3449bf..39eb5c30 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs @@ -74,8 +74,11 @@ namespace WebsitePanel.Portal.ExchangeServer if (account.AccountType == ExchangeAccountType.SharedMailbox) litDisplayName.Text += GetSharedLocalizedString("SharedMailbox.Text"); - if (account.AccountType == ExchangeAccountType.ResourceMailbox) - litDisplayName.Text += GetSharedLocalizedString("ResourceMailbox.Text"); + if (account.AccountType == ExchangeAccountType.Room) + litDisplayName.Text += GetSharedLocalizedString("RoomMailbox.Text"); + + if (account.AccountType == ExchangeAccountType.Equipment) + litDisplayName.Text += GetSharedLocalizedString("EquipmentMailbox.Text"); } catch (Exception ex) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx index 53fc882f..aba30904 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx @@ -108,7 +108,7 @@ OnSelected="odsAccountsPaged_Selected"> - + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.cs index 80682fe2..09f60d64 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxes.ascx.cs @@ -151,6 +151,7 @@ namespace WebsitePanel.Portal.ExchangeServer { ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId; string imgName = "mailbox_16.gif"; + if (accountType == ExchangeAccountType.Contact) imgName = "contact_16.gif"; else if (accountType == ExchangeAccountType.DistributionList) @@ -159,6 +160,8 @@ namespace WebsitePanel.Portal.ExchangeServer imgName = "room_16.gif"; else if (accountType == ExchangeAccountType.Equipment) imgName = "equipment_16.gif"; + else if (accountType == ExchangeAccountType.SharedMailbox) + imgName = "shared_16.gif"; if (vip && cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels)) imgName = "vip_user_16.png"; @@ -259,13 +262,13 @@ namespace WebsitePanel.Portal.ExchangeServer chkMailboxes.Checked = true; if (chkMailboxes.Checked) - accountTypes.AddRange(new string[] {"1","5","6"}); + accountTypes.Add("1"); if (chkSharedMailboxes.Checked) accountTypes.Add("10"); if (chkResourceMailboxes.Checked) - accountTypes.Add("11"); + accountTypes.AddRange(new string[] {"5","6"}); odsAccountsPaged.SelectParameters["accountTypes"].DefaultValue = string.Join(",", accountTypes); } From 9b9ff1f6e2701c3f003c5e6c4337760ad772e592 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Thu, 27 Nov 2014 10:34:06 -0500 Subject: [PATCH 27/42] Added tag build-2.1.0.472 for changeset e2c6a01ca981 From 52a83bfa61ff5b64485ed072a098937eb2ee68a9 Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Fri, 28 Nov 2014 19:48:26 +0400 Subject: [PATCH 28/42] Exchange Shared and Resource mailboxes : Import.CsvBulk fix --- .../ExchangeImport.cs | 54 ++++++++++++++++--- 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/WebsitePanel/Sources/Tools/WebsitePanel.Import.CsvBulk/ExchangeImport.cs b/WebsitePanel/Sources/Tools/WebsitePanel.Import.CsvBulk/ExchangeImport.cs index 4988105d..1a7a64ab 100644 --- a/WebsitePanel/Sources/Tools/WebsitePanel.Import.CsvBulk/ExchangeImport.cs +++ b/WebsitePanel/Sources/Tools/WebsitePanel.Import.CsvBulk/ExchangeImport.cs @@ -46,7 +46,10 @@ namespace WebsitePanel.Import.CsvBulk { Mailbox, Contact, - User + User, + Room, + Equipment, + SharedMailbox } /// @@ -487,9 +490,12 @@ namespace WebsitePanel.Import.CsvBulk if (!StringEquals(typeName, "Mailbox") && !StringEquals(typeName, "Contact") && - !StringEquals(typeName, "User")) + !StringEquals(typeName, "User")&& + !StringEquals(typeName, "Room")&& + !StringEquals(typeName, "Equipment")&& + !StringEquals(typeName, "SharedMailbox")) { - Log.WriteError(string.Format("Error at line {0}: field 'Type' is invalid. Should be 'Mailbox' or 'Contact' or 'User'", index + 1)); + Log.WriteError(string.Format("Error at line {0}: field 'Type' is invalid. Should be 'Mailbox' or 'Contact' or 'User' or 'Room' or 'Equipment' or 'SharedMailbox'", index + 1)); return false; } @@ -524,7 +530,7 @@ namespace WebsitePanel.Import.CsvBulk if (type == AccountTypes.Mailbox) { //create mailbox using web service - if (!CreateMailbox(index, orgId, displayName, emailAddress, password, firstName, middleName, lastName, + if (!CreateMailbox(ExchangeAccountType.Mailbox, index, orgId, displayName, emailAddress, password, firstName, middleName, lastName, address, city, state, zip, country, jobTitle, company, department, office, businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, planId)) { @@ -532,6 +538,42 @@ namespace WebsitePanel.Import.CsvBulk } totalMailboxes++; } + if (type == AccountTypes.Room) + { + //create mailbox using web service + if (!CreateMailbox(ExchangeAccountType.Room, index, orgId, displayName, emailAddress, password, firstName, middleName, lastName, + address, city, state, zip, country, jobTitle, company, department, office, + businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, planId)) + { + return false; + } + totalMailboxes++; + } + if (type == AccountTypes.Equipment) + { + //create mailbox using web service + if (!CreateMailbox(ExchangeAccountType.Equipment, index, orgId, displayName, emailAddress, password, firstName, middleName, lastName, + address, city, state, zip, country, jobTitle, company, department, office, + businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, planId)) + { + return false; + } + totalMailboxes++; + } + if (type == AccountTypes.SharedMailbox) + { + //create mailbox using web service + if (!CreateMailbox(ExchangeAccountType.SharedMailbox, index, orgId, displayName, emailAddress, password, firstName, middleName, lastName, + address, city, state, zip, country, jobTitle, company, department, office, + businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, planId)) + { + return false; + } + totalMailboxes++; + } + + + else if (type == AccountTypes.Contact) { //create contact using web service @@ -561,7 +603,7 @@ namespace WebsitePanel.Import.CsvBulk /// /// Creates mailbox /// - private bool CreateMailbox(int index, int orgId, string displayName, string emailAddress, string password, string firstName, string middleName, string lastName, + private bool CreateMailbox(ExchangeAccountType exchangeAccountType, int index, int orgId, string displayName, string emailAddress, string password, string firstName, string middleName, string lastName, string address, string city, string state, string zip, string country, string jobTitle, string company, string department, string office, string businessPhone, string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes, int planId) { @@ -574,7 +616,7 @@ namespace WebsitePanel.Import.CsvBulk //create mailbox //ES.Services.ExchangeServer. string accountName = string.Empty; - int accountId = ES.Services.ExchangeServer.CreateMailbox(orgId, 0, ExchangeAccountType.Mailbox, accountName, displayName, name, domain, password, false, string.Empty, planId, -1, string.Empty, false); + int accountId = ES.Services.ExchangeServer.CreateMailbox(orgId, 0, exchangeAccountType, accountName, displayName, name, domain, password, false, string.Empty, planId, -1, string.Empty, false); if (accountId < 0) { string errorMessage = GetErrorMessage(accountId); From b3b60fd3d7cccf3255434e3e667b76e05c155ed5 Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Fri, 28 Nov 2014 20:44:50 +0400 Subject: [PATCH 29/42] Exchange Shared and Resource mailboxes : Import.Enterprise fix --- .../OrganizationImporter.cs | 54 ++++++++++++------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/OrganizationImporter.cs b/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/OrganizationImporter.cs index e8f7f563..72a5aebe 100644 --- a/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/OrganizationImporter.cs +++ b/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/OrganizationImporter.cs @@ -780,25 +780,43 @@ namespace WebsitePanel.Import.Enterprise return userId; } int mailboxType = (int)type.Value; + + PropertyValueCollection typeDetails = entry.Properties["msExchRecipientTypeDetails"]; + int mailboxTypeDetails = 0; + if (typeDetails!=null) + { + if (typeDetails.Value != null) + mailboxTypeDetails = (int)typeDetails.Value; + } + ExchangeAccountType accountType = ExchangeAccountType.Undefined; - switch (mailboxType) - { - case 1073741824: - Log.WriteInfo("Account type : mailbox"); - accountType = ExchangeAccountType.Mailbox; - break; - case 7: - Log.WriteInfo("Account type : room"); - accountType = ExchangeAccountType.Room; - break; - case 8: - Log.WriteInfo("Account type : equipment"); - accountType = ExchangeAccountType.Equipment; - break; - default: - Log.WriteInfo("Account type : unknown"); - return userId; - } + + if (mailboxTypeDetails == 4) + { + Log.WriteInfo("Account type : shared mailbox"); + accountType = ExchangeAccountType.SharedMailbox; + } + else + { + switch (mailboxType) + { + case 1073741824: + Log.WriteInfo("Account type : mailbox"); + accountType = ExchangeAccountType.Mailbox; + break; + case 7: + Log.WriteInfo("Account type : room"); + accountType = ExchangeAccountType.Room; + break; + case 8: + Log.WriteInfo("Account type : equipment"); + accountType = ExchangeAccountType.Equipment; + break; + default: + Log.WriteInfo("Account type : unknown"); + return userId; + } + } UpdateExchangeAccount(userId, accountName, accountType, displayName, email, false, string.Empty, samName, string.Empty); From 25fdedd22121faff7641a78164d43564634d0562 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Fri, 28 Nov 2014 12:28:28 -0500 Subject: [PATCH 30/42] Added tag build-2.1.0.473 for changeset a9692feac46f From eb9b311bba406c2f8ab7f2d7f007ee92b2cf93a9 Mon Sep 17 00:00:00 2001 From: Olov Karlsson Date: Sun, 30 Nov 2014 09:13:06 +0100 Subject: [PATCH 31/42] IIS SSL updates, mostly SNI/CCS-related, but also a lot of UI fixes/improvements --- .../SSL/SSLModuleService80.cs | 305 ++++++++++-------- .../WebsitePanel/WebSitesEditSite.ascx.cs | 4 +- .../WebsitePanel/WebsitesSSL.ascx | 18 +- .../WebsitePanel/WebsitesSSL.ascx.cs | 255 ++++++--------- .../WebsitePanel/WebsitesSSL.ascx.designer.cs | 61 ++-- 5 files changed, 299 insertions(+), 344 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs80/SSL/SSLModuleService80.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs80/SSL/SSLModuleService80.cs index 01baf828..1395bde6 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs80/SSL/SSLModuleService80.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs80/SSL/SSLModuleService80.cs @@ -49,14 +49,6 @@ namespace WebsitePanel.Providers.Web.Iis // We need to move it into "WebHosting" store // Get certificate var servercert = GetServerCertificates(StoreName.My.ToString()).Single(c => c.FriendlyName == cert.FriendlyName); - if (UseCCS) - { - // Delete existing certificate, if any. This is needed to install a new binding - if (CheckCertificate(website)) - { - DeleteCertificate(GetCurrentSiteCertificate(website), website); - } - } // Get certificate data - the one we just added to "Personal" store var storeMy = new X509Store(StoreName.My, StoreLocation.LocalMachine); @@ -64,6 +56,7 @@ namespace WebsitePanel.Providers.Web.Iis X509CertificateCollection existCerts2 = storeMy.Certificates.Find(X509FindType.FindBySerialNumber, servercert.SerialNumber, false); var certData = existCerts2[0].Export(X509ContentType.Pfx); storeMy.Close(); + var x509Cert = new X509Certificate2(certData); if (UseCCS) { @@ -74,7 +67,6 @@ namespace WebsitePanel.Providers.Web.Iis { // Add new certificate to "WebHosting" store var store = new X509Store(CertificateStoreName, StoreLocation.LocalMachine); - var x509Cert = new X509Certificate2(certData); store.Open(OpenFlags.ReadWrite); store.Add(x509Cert); store.Close(); @@ -85,6 +77,7 @@ namespace WebsitePanel.Providers.Web.Iis X509CertificateCollection existCerts = storeMy.Certificates.Find(X509FindType.FindBySerialNumber, servercert.SerialNumber, false); storeMy.Remove((X509Certificate2)existCerts[0]); storeMy.Close(); + // Fill object with certificate data cert.SerialNumber = servercert.SerialNumber; cert.ValidFrom = servercert.ValidFrom; @@ -99,7 +92,7 @@ namespace WebsitePanel.Providers.Web.Iis DeleteCertificate(GetCurrentSiteCertificate(website), website); } - AddBinding(cert, website); + AddBinding(x509Cert, website); } } catch (Exception ex) @@ -113,8 +106,10 @@ namespace WebsitePanel.Providers.Web.Iis public new List GetServerCertificates() { - // Use Web Hosting store - new for IIS 8.0 - return GetServerCertificates(CertificateStoreName); + // Get certificates from both WebHosting and My (Personal) store + var certificates = GetServerCertificates(CertificateStoreName); + certificates.AddRange(GetServerCertificates(StoreName.My.ToString())); + return certificates; } public new SSLCertificate ImportCertificate(WebSite website) @@ -134,12 +129,12 @@ namespace WebsitePanel.Providers.Web.Iis }; } - return certificate; + return certificate ?? (new SSLCertificate {Success = false, Certificate = "No certificate in binding on server, please remove or edit binding"}); } public new SSLCertificate InstallPfx(byte[] certificate, string password, WebSite website) { - SSLCertificate newcert, oldcert = null; + SSLCertificate newcert = null, oldcert = null; // Ensure we perform operations safely and preserve the original state during all manipulations, save the oldcert if one is used if (CheckCertificate(website)) @@ -170,7 +165,7 @@ namespace WebsitePanel.Providers.Web.Iis writer.Write(certData); writer.Flush(); writer.Close(); - // Certificated saved + // Certificate saved } catch (Exception ex) { @@ -189,7 +184,6 @@ namespace WebsitePanel.Providers.Web.Iis try { store.Open(OpenFlags.ReadWrite); - store.Add(x509Cert); } catch (Exception ex) @@ -205,82 +199,38 @@ namespace WebsitePanel.Providers.Web.Iis } // Step 2: Instantiate a copy of new X.509 certificate - try - { - store.Open(OpenFlags.ReadWrite); - newcert = GetSSLCertificateFromX509Certificate2(x509Cert); - } - catch (Exception ex) - { - if (!UseCCS) - { - // Rollback X.509 store changes - store.Remove(x509Cert); - } - // Log error - Log.WriteError("SSLModuleService could not instantiate a copy of new X.509 certificate. All previous changes have been rolled back.", ex); - // Re-throw - throw; - } - finally - { - store.Close(); - } + try + { + newcert = GetSSLCertificateFromX509Certificate2(x509Cert); + } + catch (Exception ex) + { + HandleExceptionAndRollbackCertificate(store, x509Cert, null, website, "SSLModuleService could not instantiate a copy of new X.509 certificate.", ex); + } - if (!UseCCS) - { - // Step 3: Remove old certificate from the web site if any - try - { - store.Open(OpenFlags.ReadWrite); - // Check if certificate already exists, remove it. - if (oldcert != null) - DeleteCertificate(oldcert, website); - } - catch (Exception ex) - { - // Rollback X.509 store changes - store.Remove(x509Cert); - // Log the error - Log.WriteError( - String.Format("SSLModuleService could not remove existing certificate from '{0}' web site. All changes have been rolled back.", website.Name), ex); - // Re-throw - throw; - } - finally - { - store.Close(); - } - } + // Step 3: Remove old certificate from the web site if any + try + { + // Check if certificate already exists, remove it. + if (oldcert != null) + { + DeleteCertificate(oldcert, website); + } + } + catch (Exception ex) + { + HandleExceptionAndRollbackCertificate(store, x509Cert, null, website, string.Format("SSLModuleService could not remove existing certificate from '{0}' web site.", website.Name), ex); + } - // Step 4: Register new certificate with HTTPS binding on the web site - try - { - //if (!UseCCS) - //{ - // store.Open(OpenFlags.ReadWrite); - //} - - AddBinding(newcert, website); - } - catch (Exception ex) - { - if (!UseCCS) - { - // Install old certificate back if any - store.Open(OpenFlags.ReadWrite); - if (oldcert != null) - InstallCertificate(oldcert, website); - // Rollback X.509 store changes - store.Remove(x509Cert); - store.Close(); - } - // Log the error - Log.WriteError( - String.Format("SSLModuleService could not add new X.509 certificate to '{0}' web site. All changes have been rolled back.", website.Name), ex); - // Re-throw - throw; - } + // Step 4: Register new certificate with HTTPS binding on the web site + try + { + AddBinding(x509Cert, website); + } + catch (Exception ex) + { + HandleExceptionAndRollbackCertificate(store, x509Cert, oldcert, website, String.Format("SSLModuleService could not add new X.509 certificate to '{0}' web site.", website.Name), ex); + } return newcert; } @@ -319,32 +269,44 @@ namespace WebsitePanel.Providers.Web.Iis } - public new void AddBinding(SSLCertificate certificate, WebSite website) + public void AddBinding(X509Certificate2 certificate, WebSite website) { using (var srvman = GetServerManager()) { - var store = new X509Store(CertificateStoreName, StoreLocation.LocalMachine); - store.Open(OpenFlags.ReadOnly); - // Look for dedicated ip var dedicatedIp = SiteHasBindingWithDedicatedIp(srvman, website); - var bindingInformation = string.Format("{0}:443:{1}", website.SiteIPAddress, dedicatedIp ? "" : certificate.Hostname); + // Look for all the hostnames this certificate is valid for if we are using SNI + var hostNames = new List(); - Binding siteBinding = UseCCS ? - srvman.Sites[website.SiteId].Bindings.Add(bindingInformation, "https") : - srvman.Sites[website.SiteId].Bindings.Add(bindingInformation, certificate.Hash, store.Name); + if (!dedicatedIp) + { + hostNames.AddRange(from extension in certificate.Extensions.Cast() where extension.Oid.FriendlyName == "Subject Alternative Name" select extension.Format(true)); + } + + if (!hostNames.Any()) + { + hostNames.Add(certificate.GetNameInfo(X509NameType.SimpleName, false)); + } + + // For every hostname (only one if using old school dedicated IP binding) + foreach (var hostName in hostNames) + { + var bindingInformation = string.Format("{0}:443:{1}", website.SiteIPAddress ?? "*", dedicatedIp ? "" : hostName); + + Binding siteBinding = UseCCS ? + srvman.Sites[website.SiteId].Bindings.Add(bindingInformation, "https") : + srvman.Sites[website.SiteId].Bindings.Add(bindingInformation, certificate.GetCertHash(), CertificateStoreName); - if (UseSNI) - { - siteBinding.SslFlags |= SslFlags.Sni; + if (UseSNI && !dedicatedIp) + { + siteBinding.SslFlags |= SslFlags.Sni; + } + if (UseCCS) + { + siteBinding.SslFlags |= SslFlags.CentralCertStore; + } } - if (UseCCS) - { - siteBinding.SslFlags |= SslFlags.CentralCertStore; - } - - store.Close(); srvman.CommitChanges(); } @@ -352,7 +314,9 @@ namespace WebsitePanel.Providers.Web.Iis public new ResultObject DeleteCertificate(SSLCertificate certificate, WebSite website) { - var result = new ResultObject() { IsSuccess = true }; + // This method removes all https bindings and all certificates associated with them. + // Old implementation (IIS70) removed a single binding (there could not be more than one) and the first certificate that matched via serial number + var result = new ResultObject { IsSuccess = true }; if (certificate == null) { @@ -361,35 +325,70 @@ namespace WebsitePanel.Providers.Web.Iis try { - // Regardless of the CCS setting on the server, we try to find and remove the certificate from both CCS and WebHosting Store. - // This is because we don't know how this was set when the certificate was added + var certificatesAndStoreNames = new List>(); - if (!string.IsNullOrWhiteSpace(CCSUncPath) && Directory.Exists(CCSUncPath)) + // User servermanager to get aLL SSL-bindings on this website and try to remove the certificates used + using (var srvman = GetServerManager()) { - // This is where it will be if CCS is used - var path = GetCCSPath(certificate.Hostname); - if (File.Exists(path)) + + var site = srvman.Sites[website.Name]; + var bindings = site.Bindings.Where(b => b.Protocol == "https"); + + foreach (Binding binding in bindings.ToList()) { - File.Delete(path); + if (binding.SslFlags.HasFlag(SslFlags.CentralCertStore)) + { + if (!string.IsNullOrWhiteSpace(CCSUncPath) && Directory.Exists(CCSUncPath)) + { + // This is where it will be if CCS is used + var path = GetCCSPath(certificate.Hostname); + if (File.Exists(path)) + { + File.Delete(path); + } + + // If binding with hostname, also try to delete with the hostname in the binding + // This is because if SNI is used, several bindings are created for every valid name in the cerificate, but only one name exists in the SSLCertificate + if (!string.IsNullOrEmpty(binding.Host)) + { + path = GetCCSPath(binding.Host); + if (File.Exists(path)) + { + File.Delete(path); + } + } + } + } + else + { + var certificateAndStoreName = new Tuple(binding.CertificateStoreName, binding.CertificateHash); + + if (!string.IsNullOrEmpty(binding.CertificateStoreName) && !certificatesAndStoreNames.Contains(certificateAndStoreName)) + { + certificatesAndStoreNames.Add(certificateAndStoreName); + } + } + + // Remove binding from site + site.Bindings.Remove(binding); } - } - // Now delete all certs with the same serialnumber in WebHosting Store - var store = new X509Store(CertificateStoreName, StoreLocation.LocalMachine); - store.Open(OpenFlags.MaxAllowed); + srvman.CommitChanges(); - var certs = store.Certificates.Find(X509FindType.FindBySerialNumber, certificate.SerialNumber, false); - foreach (var cert in certs) - { - store.Remove(cert); - } + foreach (var certificateAndStoreName in certificatesAndStoreNames) + { + // Delete all certs with the same serialnumber in Store + var store = new X509Store(certificateAndStoreName.Item1, StoreLocation.LocalMachine); + store.Open(OpenFlags.MaxAllowed); - store.Close(); + var certs = store.Certificates.Find(X509FindType.FindByThumbprint, BitConverter.ToString(certificateAndStoreName.Item2).Replace("-", ""), false); + foreach (var cert in certs) + { + store.Remove(cert); + } - // Remove binding from site - if (CheckCertificate(website)) - { - RemoveBinding(certificate, website); + store.Close(); + } } } catch (Exception ex) @@ -409,9 +408,7 @@ namespace WebsitePanel.Providers.Web.Iis var site = srvman.Sites[website.SiteId]; var sslBinding = site.Bindings.First(b => b.Protocol == "https"); - X509Certificate2 cert = null; - - // If the certificate is in the central store + // If the certificate is in the central store if (((SslFlags)Enum.Parse(typeof(SslFlags), sslBinding["sslFlags"].ToString())).HasFlag(SslFlags.CentralCertStore)) { // Let's try to match binding host and certificate filename @@ -423,23 +420,19 @@ namespace WebsitePanel.Providers.Web.Iis // Read certificate data from file var certData = new byte[fileStream.Length]; fileStream.Read(certData, 0, (int) fileStream.Length); - cert = new X509Certificate2(certData, CCSCommonPassword); + var cert = new X509Certificate2(certData, CCSCommonPassword); fileStream.Close(); + return GetSSLCertificateFromX509Certificate2(cert); } } else { - var currentHash = sslBinding.CertificateHash; - var store = new X509Store(CertificateStoreName, StoreLocation.LocalMachine); - store.Open(OpenFlags.ReadOnly); - - cert = store.Certificates.Cast().Single(c => Convert.ToBase64String(c.GetCertHash()) == Convert.ToBase64String(currentHash)); - - store.Close(); + var currentHash = Convert.ToBase64String(sslBinding.CertificateHash); + return GetServerCertificates().FirstOrDefault(c => Convert.ToBase64String(c.Hash) == currentHash); } - - return GetSSLCertificateFromX509Certificate2(cert); } + + return null; } private static List GetServerCertificates(string certificateStoreName) @@ -504,5 +497,33 @@ namespace WebsitePanel.Providers.Web.Iis return false; } } + + private void HandleExceptionAndRollbackCertificate(X509Store store, X509Certificate2 x509Cert, SSLCertificate oldCert, WebSite webSite, string errorMessage, Exception ex) + { + if (!UseCCS) + { + try + { + // Rollback X.509 store changes + store.Open(OpenFlags.ReadWrite); + store.Remove(x509Cert); + store.Close(); + } + catch (Exception) + { + Log.WriteError("SSLModuleService could not rollback and remove certificate from store", ex); + } + + // Install old certificate back if any + if (oldCert != null) + InstallCertificate(oldCert, webSite); + } + + // Log the error + Log.WriteError(errorMessage + " All changes have been rolled back.", ex); + + // Re-throw + throw ex; + } } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx.cs index 5d5a954d..2b53d79e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx.cs @@ -109,7 +109,7 @@ namespace WebsitePanel.Portal { var filteredTabs = TabsList.FilterTabsByHostingPlanQuotas(PackageId).ToList(); - // remove "SSL" tab for a site with dynamic IP + // remove "SSL" tab for a site with dynamic IP and not SNI enabled var sslTab = filteredTabs.SingleOrDefault(t => t.Id == "SSL"); if (!AllowSsl && sslTab != null) filteredTabs.Remove(sslTab); @@ -1071,6 +1071,7 @@ namespace WebsitePanel.Portal sharedIP.Visible = false; switchToDedicatedIP.Visible = true; + WebsitesSSLControl.InstalledCert = null; } protected void cmdSwitchToSharedIP_Click(object sender, EventArgs e) @@ -1090,6 +1091,7 @@ namespace WebsitePanel.Portal dlTabs.SelectedIndex = 0; + WebsitesSSLControl.InstalledCert = null; } catch (Exception ex) { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx index 93b38d0f..b7c51011 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx @@ -141,6 +141,8 @@

+
@@ -151,13 +153,7 @@ - - - - - - - + @@ -173,7 +169,7 @@ + ControlToValidate="txtCompany" ErrorMessage="*" /> @@ -196,7 +192,7 @@ + ControlToValidate="txtState" Display="Dynamic" ErrorMessage="*" /> @@ -204,7 +200,7 @@ + ControlToValidate="txtCity" ErrorMessage="*" />
@@ -254,6 +250,8 @@
+ diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx.cs index 91e97c36..d6897098 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx.cs @@ -135,10 +135,18 @@ namespace WebsitePanel.Portal } } - private void BindListOfAvailableSslDomains(string websiteName, string domainName) - { - rbSiteCertificate.Text = websiteName; - rbDomainCertificate.Text = "*." + domainName; + private void BindListOfAvailableSslDomains(string defaultBindingName) + { + var domains = ES.Services.WebServers.GetWebSitePointers(SiteId).ToList(); + + // If no pointers at all, add website default domain + if (domains.All(d => d.DomainName != defaultBindingName)) + { + domains.Add(new DomainInfo() { DomainName = defaultBindingName, IsDomainPointer = false}); + } + + ddlbSiteCertificate.Items.AddRange(domains.Select(d => new ListItem(d.DomainName)).ToArray()); + ddlbSiteCertificate.Items.AddRange(domains.Where(d => !d.IsDomainPointer).Select(d => new ListItem("*." + d.DomainName)).ToArray()); } public void BindWebItem(WebVirtualDirectory item) @@ -148,106 +156,10 @@ namespace WebsitePanel.Portal // Skip processing virtual directories, otherwise we will likely run into a trouble if (webSite == null) return; - // - bool hasactive = false; - bool haspending = false; - SiteId = item.Id; - // - try - { - SSLCertificate[] certificates = ES.Services.WebServers.GetCertificatesForSite(item.Id); + SiteId = item.Id; - SSLNotInstalled.Visible = true; - - DomainInfo[] domains = ES.Services.Servers.GetDomains(PanelSecurity.PackageId); - string zoneName = string.Empty; - foreach (DomainInfo d in domains) - { - if (d.WebSiteId == SiteId) - { - zoneName = d.ZoneName; - break; - } - } - - // - BindListOfAvailableSslDomains(webSite.Name, zoneName); - - if (certificates.Length > 0) - { - foreach (SSLCertificate cert in certificates) - { - if (cert.Installed) - { - hasactive = true; - } - else - { - haspending = true; - } - } - } - - // Web site has active certificate - if (hasactive) - { - tabInstalled.Visible = true; - tabInstalled.Enabled = true; - tabInstalled.HeaderText = GetLocalizedString("tabInstalled.Text"); - - InstalledCert = (from c in certificates - where c.Installed == true - select c).SingleOrDefault(); - // - BindCertificateFields(); - // Attention please, the certificate is about to expire! - TimeSpan daystoexp = DateTime.Now - InstalledCert.ExpiryDate; - if (daystoexp.Days < 30) - { - lblInstalledExpiration.ForeColor = System.Drawing.Color.Red; - } - // Put some data to the ViewState - ViewState["SSLID"] = InstalledCert.id; - ViewState["SSLSerial"] = InstalledCert.SerialNumber; - // - if (!haspending) - { - btnShowpnlCSR.Attributes.Add("OnClientClick", "return confirm('" + GetLocalizedString("btnInstallConfirm.Text") + "');"); - btnShowUpload.Attributes.Add("OnClientClick", "return confirm('" + GetLocalizedString("btnInstallConfirm.Text") + "');"); - SSLNotInstalledHeading.Text = GetLocalizedString("SSLInstalledNewHeading.Text"); - SSLNotInstalledDescription.Text = GetLocalizedString("SSLInstalledNewDescription.Text"); - } - } - - // Web site has pending certificate - if (haspending) - { - tabCSR.HeaderText = GetLocalizedString("tabPendingCertificate.HeaderText");//"Pending Certificate"; - SSLNotInstalled.Visible = false; - pnlInstallCertificate.Visible = true; - SSLCertificate pending = (from c in certificates - where c.Installed == false - select c).Single(); - ViewState["CSRID"] = pending.id; - txtCSR.Text = pending.CSR; - txtCSR.Attributes.Add("onfocus", "this.select();"); - if (InstalledCert != null) - { - btnInstallCertificate.Attributes.Add("OnClientClick", "return confirm('" + GetLocalizedString("btnInstallConfirm.Text") + "');"); - } - } - - if (!hasactive && ES.Services.WebServers.CheckCertificate(item.Id).IsSuccess) - { - SSLNotInstalled.Visible = false; - SSLImport.Visible = true; - } - } - catch (Exception ex) - { - messageBox.ShowErrorMessage("WEB_GET_SSL", ex); - } + RefreshControlLayout(); } protected void btnShowpnlCSR_click(object sender, EventArgs e) @@ -271,7 +183,8 @@ namespace WebsitePanel.Portal L={3}, S={4}, C={5}", - rbSiteCertificate.Checked ? rbSiteCertificate.Text : rbDomainCertificate.Text, + //rbSiteCertificate.Checked ? rbSiteCertificate.Text : rbDomainCertificate.Text, + ddlbSiteCertificate.SelectedValue, txtCompany.Text, txtOU.Text, txtCity.Text, @@ -279,7 +192,7 @@ namespace WebsitePanel.Portal lstCountries.SelectedValue); SSLCertificate certificate = new SSLCertificate(); - certificate.Hostname = rbSiteCertificate.Checked ? rbSiteCertificate.Text : rbDomainCertificate.Text; + certificate.Hostname = ddlbSiteCertificate.SelectedValue; //rbSiteCertificate.Checked ? rbSiteCertificate.Text : rbDomainCertificate.Text; certificate.DistinguishedName = distinguishedName; certificate.CSRLength = Convert.ToInt32(lstBits.SelectedValue); certificate.Organisation = txtCompany.Text; @@ -336,7 +249,7 @@ namespace WebsitePanel.Portal OU={2}, L={3}, S={4}, - C={5}", rbSiteCertificate.Checked ? rbSiteCertificate.Text : rbDomainCertificate.Text, + C={5}", ddlbSiteCertificate.SelectedValue, //rbSiteCertificate.Checked ? rbSiteCertificate.Text : rbDomainCertificate.Text, txtCompany.Text, txtOU.Text, txtCity.Text, @@ -344,7 +257,7 @@ namespace WebsitePanel.Portal lstCountries.SelectedValue); SSLCertificate certificate = new SSLCertificate(); - certificate.Hostname = rbSiteCertificate.Checked ? rbSiteCertificate.Text : rbDomainCertificate.Text; + certificate.Hostname = ddlbSiteCertificate.SelectedValue; //rbSiteCertificate.Checked ? rbSiteCertificate.Text : rbDomainCertificate.Text; certificate.DistinguishedName = distinguishedName; certificate.CSRLength = Convert.ToInt32(lstBits.SelectedValue); certificate.Organisation = txtCompany.Text; @@ -369,7 +282,7 @@ namespace WebsitePanel.Portal pnlCSR.Visible = false; ViewState["CSRID"] = certificate.id; txtCSR.Attributes.Add("onfocus", "this.select();"); - RefreshControlLayout(PanelRequest.ItemID); + RefreshControlLayout(); TabContainer1.ActiveTab = TabContainer1.Tabs[0]; messageBox.ShowSuccessMessage(WEB_GEN_CSR); } @@ -402,7 +315,7 @@ namespace WebsitePanel.Portal // TabContainer1.ActiveTab = tabInstalled; - RefreshControlLayout(webSiteId); + RefreshControlLayout(); } protected void btnInstallPFX_Click(object sender, EventArgs e) @@ -428,13 +341,14 @@ namespace WebsitePanel.Portal if (result.IsSuccess.Equals(false)) { messageBox.ShowErrorMessage("WEB_INSTALL_CSR"); - return; + RefreshControlLayout(); + return; } // messageBox.ShowSuccessMessage("WEB_INSTALL_CSR"); SSLNotInstalled.Visible = false; tabInstalled.Visible = true; - RefreshControlLayout(SiteId); + RefreshControlLayout(); } protected void BindCertificateFields() @@ -560,43 +474,43 @@ namespace WebsitePanel.Portal if (!result.IsSuccess) { messageBox.ShowErrorMessage("WEB_INSTALL_CSR"); + RefreshControlLayout(); return; } // Show success message and display appropriate controls messageBox.ShowSuccessMessage("WEB_INSTALL_CSR"); - SSLNotInstalled.Visible = false; - tabInstalled.Visible = true; - // - RefreshControlLayout(webSiteId); + + RefreshControlLayout(); } - protected void RefreshControlLayout(int webSiteId) + public void RefreshControlLayout() { - bool hasActiveCert = false; - bool hasPendingCert = false; - // + // + bool hasactive = false; + bool haspending = false; + try { - SSLCertificate[] certificates = ES.Services.WebServers.GetCertificatesForSite(webSiteId); + var webSite = ES.Services.WebServers.GetWebSite(SiteId); - WebSite item = ES.Services.WebServers.GetWebSite(webSiteId); + // Get all certificate infos stored in database + SSLCertificate[] certificates = ES.Services.WebServers.GetCertificatesForSite(SiteId); - SSLNotInstalled.Visible = true; - // + // Set some default visible values, states and texts + tabInstalled.Visible = false; + tabInstalled.Enabled = false; + SSLNotInstalled.Visible = true; + SSLImport.Visible = false; + pnlCSR.Visible = false; + pnlShowUpload.Visible = false; + pnlInstallCertificate.Visible = false; - DomainInfo[] domains = ES.Services.Servers.GetDomains(PanelSecurity.PackageId); - string zoneName = string.Empty; - foreach (DomainInfo d in domains) - { - if (d.WebSiteId == item.Id) - { - zoneName = d.ZoneName; - break; - } - } + btnShowpnlCSR.Attributes.Remove("OnClientClick"); + btnShowUpload.Attributes.Remove("OnClientClick"); + SSLNotInstalledHeading.Text = GetLocalizedString("SSLNotInstalledHeading.Text"); + SSLNotInstalledDescription.Text = GetLocalizedString("SSLNotInstalledDescription.Text"); - // - BindListOfAvailableSslDomains(item.Name, zoneName); + BindListOfAvailableSslDomains(webSite.Name); if (certificates.Length > 0) { @@ -604,16 +518,17 @@ namespace WebsitePanel.Portal { if (cert.Installed) { - hasActiveCert = true; + hasactive = true; } else { - hasPendingCert = true; + haspending = true; } } } - if (hasActiveCert) + // Web site has active certificate + if (hasactive) { tabInstalled.Visible = true; tabInstalled.Enabled = true; @@ -622,18 +537,19 @@ namespace WebsitePanel.Portal InstalledCert = (from c in certificates where c.Installed == true select c).SingleOrDefault(); - - TimeSpan daystoexp = DateTime.Now - InstalledCert.ExpiryDate; - - BindCertificateFields(); // - bool certAbout2Exp = daystoexp.Days < 30 - ? lblInstalledExpiration.ForeColor == System.Drawing.Color.Red - : lblInstalledExpiration.ForeColor == System.Drawing.Color.Black; + BindCertificateFields(); + // Attention please, the certificate is about to expire! + TimeSpan daystoexp = InstalledCert.ExpiryDate - DateTime.Now; + if (daystoexp.Days < 30) + { + lblInstalledExpiration.ForeColor = System.Drawing.Color.Red; + } + // Put some data to the ViewState ViewState["SSLID"] = InstalledCert.id; ViewState["SSLSerial"] = InstalledCert.SerialNumber; - - if (!hasPendingCert) + // + if (!haspending) { btnShowpnlCSR.Attributes.Add("OnClientClick", "return confirm('" + GetLocalizedString("btnInstallConfirm.Text") + "');"); btnShowUpload.Attributes.Add("OnClientClick", "return confirm('" + GetLocalizedString("btnInstallConfirm.Text") + "');"); @@ -642,9 +558,10 @@ namespace WebsitePanel.Portal } } - if (hasPendingCert) + // Web site has pending certificate + if (haspending) { - tabCSR.HeaderText = GetLocalizedString("tabPendingCertificate.HeaderText"); + tabCSR.HeaderText = GetLocalizedString("tabPendingCertificate.HeaderText");//"Pending Certificate"; SSLNotInstalled.Visible = false; pnlInstallCertificate.Visible = true; SSLCertificate pending = (from c in certificates @@ -653,12 +570,17 @@ namespace WebsitePanel.Portal ViewState["CSRID"] = pending.id; txtCSR.Text = pending.CSR; txtCSR.Attributes.Add("onfocus", "this.select();"); - if (InstalledCert != null) { btnInstallCertificate.Attributes.Add("OnClientClick", "return confirm('" + GetLocalizedString("btnInstallConfirm.Text") + "');"); } } + + if (!hasactive && ES.Services.WebServers.CheckCertificate(SiteId).IsSuccess) + { + SSLNotInstalled.Visible = false; + SSLImport.Visible = true; + } } catch (Exception ex) { @@ -668,7 +590,10 @@ namespace WebsitePanel.Portal protected void SetCertHostnameSelection(string hostname) { - rbSiteCertificate.Checked = (rbSiteCertificate.Text == hostname); + if (ddlbSiteCertificate.Items.Contains(new ListItem(hostname))) + { + ddlbSiteCertificate.SelectedValue = hostname; + } } protected void SetCertCountrySelection(string country) @@ -701,5 +626,33 @@ namespace WebsitePanel.Portal listCtl.ClearSelection(); li.Selected = true; } - } + + protected void btnCancelRequest_Click(object sender, EventArgs e) + { + ResultObject result = null; + try + { + result = ES.Services.WebServers.DeleteCertificateRequest(SiteId, (int)ViewState["CSRID"]); + } + catch (Exception ex) + { + messageBox.ShowErrorMessage(WEB_SSL_DELETE, ex); + } + // + if (!result.IsSuccess) + { + messageBox.ShowErrorMessage(WEB_SSL_DELETE); + return; + } + // + SSLNotInstalled.Visible = true; + pnlCSR.Visible = false; + pnlInstallCertificate.Visible = false; + } + + protected void btnDeleteAll_Click(object sender, EventArgs e) + { + DeleteCertificate(SiteId, new SSLCertificate()); + } + } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx.designer.cs index a6707def..0434502a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitesSSL.ascx.designer.cs @@ -1,32 +1,4 @@ -// Copyright (c) 2014, Outercurve Foundation. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// - Neither the name of the Outercurve Foundation nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // @@ -355,6 +327,15 @@ namespace WebsitePanel.Portal { /// protected global::System.Web.UI.WebControls.Button btnImport; + /// + /// btnDeleteAll control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnDeleteAll; + /// /// pnlCSR control. /// @@ -374,22 +355,13 @@ namespace WebsitePanel.Portal { protected global::System.Web.UI.WebControls.Localize SelectCertType; /// - /// rbSiteCertificate control. + /// ddlbSiteCertificate control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RadioButton rbSiteCertificate; - - /// - /// rbDomainCertificate control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RadioButton rbDomainCertificate; + protected global::System.Web.UI.WebControls.DropDownList ddlbSiteCertificate; /// /// sslBitLength control. @@ -678,5 +650,14 @@ namespace WebsitePanel.Portal { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Button btnInstallCertificate; + + /// + /// btnCancelRequest control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnCancelRequest; } } From dbcdf29ed2903537188cb6d5bd183680482ee6c4 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Sun, 30 Nov 2014 07:52:09 -0500 Subject: [PATCH 32/42] Added tag build-2.1.0.474 for changeset 649c8f1906e6 From 14a1a06dd192590792bf4f5f2e2c64d5ee8beedb Mon Sep 17 00:00:00 2001 From: Olov Karlsson Date: Mon, 1 Dec 2014 22:38:17 +0100 Subject: [PATCH 33/42] Corrected the way alternate names from a certificate is extracted and used --- .../SSL/SSLModuleService80.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs80/SSL/SSLModuleService80.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs80/SSL/SSLModuleService80.cs index 1395bde6..3e1a6382 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs80/SSL/SSLModuleService80.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs80/SSL/SSLModuleService80.cs @@ -281,12 +281,15 @@ namespace WebsitePanel.Providers.Web.Iis if (!dedicatedIp) { - hostNames.AddRange(from extension in certificate.Extensions.Cast() where extension.Oid.FriendlyName == "Subject Alternative Name" select extension.Format(true)); + hostNames.AddRange(certificate.Extensions.Cast() + .Where(e => e.Oid.FriendlyName == "Subject Alternative Name") + .Select(e => e.Format(true).Replace("DNS Name=", ""))); } - if (!hostNames.Any()) + var simpleName = certificate.GetNameInfo(X509NameType.SimpleName, false); + if (hostNames.All(h => h != simpleName)) { - hostNames.Add(certificate.GetNameInfo(X509NameType.SimpleName, false)); + hostNames.Add(simpleName); } // For every hostname (only one if using old school dedicated IP binding) From ebf1665dbc31a2f10c0e00c43285146858615cbb Mon Sep 17 00:00:00 2001 From: Olov Karlsson Date: Tue, 2 Dec 2014 08:49:47 +0100 Subject: [PATCH 34/42] And now alternate names can be extracted from certificates on machines other then US/english --- .../SSL/SSLModuleService80.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs80/SSL/SSLModuleService80.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs80/SSL/SSLModuleService80.cs index 3e1a6382..1ba070aa 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs80/SSL/SSLModuleService80.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs80/SSL/SSLModuleService80.cs @@ -282,8 +282,8 @@ namespace WebsitePanel.Providers.Web.Iis if (!dedicatedIp) { hostNames.AddRange(certificate.Extensions.Cast() - .Where(e => e.Oid.FriendlyName == "Subject Alternative Name") - .Select(e => e.Format(true).Replace("DNS Name=", ""))); + .Where(e => e.Oid.Value == "2.5.29.17") // Subject Alternative Names + .SelectMany(e => e.Format(true).Split(new[] {"\r\n", "\n", "\n"}, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Split('=')[1]))); } var simpleName = certificate.GetNameInfo(X509NameType.SimpleName, false); From 519eb1f9ebc0afe322c3596caa99a0796e9c734a Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Tue, 2 Dec 2014 08:47:21 -0500 Subject: [PATCH 35/42] Added tag build-2.1.0.475 for changeset 709c1fd61109 From 1f5d09fbb1fe16276278bfa66b1d261a95e15fe1 Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Tue, 2 Dec 2014 19:09:00 +0400 Subject: [PATCH 36/42] Import.Enterprise fix --- .../ApplicationForm.cs | 66 +++++++++++++------ .../OrganizationImporter.cs | 30 +++++---- 2 files changed, 64 insertions(+), 32 deletions(-) diff --git a/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/ApplicationForm.cs b/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/ApplicationForm.cs index fb403a0a..deefb00d 100644 --- a/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/ApplicationForm.cs +++ b/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/ApplicationForm.cs @@ -164,34 +164,60 @@ namespace WebsitePanel.Import.Enterprise type = null; email = null; name = (string)child.Properties["name"].Value; + //account type typeProp = child.Properties["msExchRecipientDisplayType"]; + + int typeDetails = 0; + PropertyValueCollection typeDetailsProp = child.Properties["msExchRecipientTypeDetails"]; + if (typeDetailsProp != null) + { + if (typeDetailsProp.Value != null) + { + try + { + object adsLargeInteger = typeDetailsProp.Value; + typeDetails = (Int32)adsLargeInteger.GetType().InvokeMember("LowPart", System.Reflection.BindingFlags.GetProperty, null, adsLargeInteger, null); + } + catch { } // just skip + } + } + switch (child.SchemaClassName) { case "user": email = (string)child.Properties["userPrincipalName"].Value; - if (typeProp == null || typeProp.Value == null) - { - type = "User"; - } - else - { - int mailboxType = (int)typeProp.Value; - switch (mailboxType) - { - case 1073741824: - type = "User Mailbox"; - break; - case 7: - type = "Room Mailbox"; - break; - case 8: - type = "Equipment Mailbox"; - break; - } - } + if (typeDetails == 4) + { + type = "Shared Mailbox"; + } + else + { + + if (typeProp == null || typeProp.Value == null) + { + type = "User"; + } + else + { + int mailboxType = (int)typeProp.Value; + + switch (mailboxType) + { + case 1073741824: + type = "User Mailbox"; + break; + case 7: + type = "Room Mailbox"; + break; + case 8: + type = "Equipment Mailbox"; + break; + } + } + } if (!string.IsNullOrEmpty(type)) { diff --git a/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/OrganizationImporter.cs b/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/OrganizationImporter.cs index 72a5aebe..7044ddeb 100644 --- a/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/OrganizationImporter.cs +++ b/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/OrganizationImporter.cs @@ -781,12 +781,20 @@ namespace WebsitePanel.Import.Enterprise } int mailboxType = (int)type.Value; - PropertyValueCollection typeDetails = entry.Properties["msExchRecipientTypeDetails"]; int mailboxTypeDetails = 0; + PropertyValueCollection typeDetails = entry.Properties["msExchRecipientTypeDetails"]; if (typeDetails!=null) { if (typeDetails.Value != null) - mailboxTypeDetails = (int)typeDetails.Value; + { + try + { + object adsLargeInteger = typeDetails.Value; + mailboxTypeDetails = (Int32)adsLargeInteger.GetType().InvokeMember("LowPart", System.Reflection.BindingFlags.GetProperty, null, adsLargeInteger, null); + } + catch { } // just skip + + } } ExchangeAccountType accountType = ExchangeAccountType.Undefined; @@ -831,18 +839,16 @@ namespace WebsitePanel.Import.Enterprise if (emailAddress.ToLower().StartsWith("smtp:")) emailAddress = emailAddress.Substring(5); - - if (!emailAddress.Equals(defaultEmail, StringComparison.InvariantCultureIgnoreCase)) + if (EmailAddressExists(emailAddress)) { - if (EmailAddressExists(emailAddress)) - { - Log.WriteInfo(string.Format("Email address {0} already exists. Skipped", emailAddress)); - continue; - } - // register email address - Log.WriteInfo(string.Format("Importing email {0}", emailAddress)); - AddAccountEmailAddress(userId, emailAddress); + if ((!emailAddress.Equals(defaultEmail, StringComparison.InvariantCultureIgnoreCase)) && (!emailAddress.Equals(email, StringComparison.InvariantCultureIgnoreCase))) + Log.WriteInfo(string.Format("Email address {0} already exists. Skipped", emailAddress)); + + continue; } + // register email address + Log.WriteInfo(string.Format("Importing email {0}", emailAddress)); + AddAccountEmailAddress(userId, emailAddress); } } Log.WriteEnd("User imported"); From 5b8f12d005f4ac7f287e265267046f834bc900f6 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Tue, 2 Dec 2014 10:41:56 -0500 Subject: [PATCH 37/42] Added tag build-2.1.0.476 for changeset 7b88d21cc19a From dede5472cc2cb019d308a51f48037eb634872fa5 Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Thu, 4 Dec 2014 12:54:00 +0400 Subject: [PATCH 38/42] wsp-10079 editing website properties returns you to wrong page. part 1 --- .../ExchangeMailboxGeneralSettings.ascx.resx | 5 +- .../ExchangeMailboxMailFlowSettings.ascx.resx | 5 +- .../ExchangeMailboxMemberOf.ascx.resx | 6 - .../ExchangeMailboxPermissions.ascx.resx | 5 +- .../OrganizationUserGeneralSettings.ascx.resx | 5 +- .../OrganizationUserMemberOf.ascx.resx | 6 - .../ExchangeMailboxGeneralSettings.ascx | 9 +- .../ExchangeMailboxGeneralSettings.ascx.cs | 2 + ...ngeMailboxGeneralSettings.ascx.designer.cs | 22 +-- .../ExchangeMailboxMailFlowSettings.ascx | 6 +- .../ExchangeMailboxMailFlowSettings.ascx.cs | 2 + ...geMailboxMailFlowSettings.ascx.designer.cs | 13 +- .../ExchangeMailboxMemberOf.ascx | 7 +- .../ExchangeMailboxMemberOf.ascx.designer.cs | 13 +- .../ExchangeMailboxPermissions.ascx | 6 +- .../ExchangeMailboxPermissions.ascx.cs | 4 + ...xchangeMailboxPermissions.ascx.designer.cs | 13 +- .../OrganizationUserGeneralSettings.ascx | 7 +- .../OrganizationUserGeneralSettings.ascx.cs | 2 + ...zationUserGeneralSettings.ascx.designer.cs | 13 +- .../OrganizationUserMemberOf.ascx | 7 +- .../OrganizationUserMemberOf.ascx.designer.cs | 13 +- .../ItemButtonPanel.ascx.resx | 126 ++++++++++++++++++ .../UserControls/ItemButtonPanel.ascx | 5 + .../UserControls/ItemButtonPanel.ascx.cs | 85 ++++++++++++ .../ItemButtonPanel.ascx.designer.cs | 33 +++++ .../WebsitePanel.Portal.Modules.csproj | 11 ++ 27 files changed, 314 insertions(+), 117 deletions(-) create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/ItemButtonPanel.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/ItemButtonPanel.ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/ItemButtonPanel.ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/ItemButtonPanel.ascx.designer.cs diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxGeneralSettings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxGeneralSettings.ascx.resx index 9b7b5be3..e3520cf0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxGeneralSettings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxGeneralSettings.ascx.resx @@ -117,12 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + ShowProgressDialog('Updating mailbox settings...'); - - Save Changes - Disable Mailbox diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxMailFlowSettings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxMailFlowSettings.ascx.resx index 9ed871cb..a245ae1d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxMailFlowSettings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxMailFlowSettings.ascx.resx @@ -117,12 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + ShowProgressDialog('Updating mailbox settings...'); - - Save Changes - Deliver messages to both forwarding address and mailbox diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxMemberOf.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxMemberOf.ascx.resx index c243cc33..83035c26 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxMemberOf.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxMemberOf.ascx.resx @@ -117,12 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ShowProgressDialog('Updating...'); - - - Save Changes - Edit Mailbox diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxPermissions.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxPermissions.ascx.resx index 9c1cac80..109aa29f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxPermissions.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxPermissions.ascx.resx @@ -117,12 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + ShowProgressDialog('Updating mailbox permissions...'); - - Save Changes - diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserGeneralSettings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserGeneralSettings.ascx.resx index b21e975e..732e6c03 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserGeneralSettings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserGeneralSettings.ascx.resx @@ -117,12 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + ShowProgressDialog('Updating user settings...'); - - Save Changes - Disable User diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserMemberOf.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserMemberOf.ascx.resx index 81ca9211..5fa94e6c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserMemberOf.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserMemberOf.ascx.resx @@ -117,12 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ShowProgressDialog('Updating...'); - - - Save Changes - Edit User diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx index 77f97218..d323d473 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx @@ -7,8 +7,9 @@ <%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> <%@ Register Src="UserControls/MailboxPlanSelector.ascx" TagName="MailboxPlanSelector" TagPrefix="wsp" %> <%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %> -<%-- < wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/> --%> +
@@ -157,10 +158,8 @@
- - +
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 edc9b2ec..69b9139f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs @@ -81,6 +81,8 @@ namespace WebsitePanel.Portal.ExchangeServer } secRetentionPolicy.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, Cntx); + + buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick"); } int planId = -1; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.designer.cs index 9f3029a2..be14fb27 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.designer.cs @@ -12,6 +12,15 @@ namespace WebsitePanel.Portal.ExchangeServer { public partial class ExchangeMailboxGeneralSettings { + /// + /// asyncTasks control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; + /// /// Image1 control. /// @@ -382,22 +391,13 @@ namespace WebsitePanel.Portal.ExchangeServer { protected global::System.Web.UI.WebControls.Label lblExchangeGuid; /// - /// btnSave control. + /// buttonPanel control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btnSave; - - /// - /// btnSaveExit control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnSaveExit; + protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel; /// /// ValidationSummary1 control. diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMailFlowSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMailFlowSettings.ascx index ed7b7c73..b7d2386b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMailFlowSettings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMailFlowSettings.ascx @@ -8,6 +8,7 @@ <%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %> <%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %> <%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %> @@ -110,9 +111,8 @@
- - +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMailFlowSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMailFlowSettings.ascx.cs index 51c04f98..bd633f88 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMailFlowSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMailFlowSettings.ascx.cs @@ -49,6 +49,8 @@ namespace WebsitePanel.Portal.ExchangeServer if (!IsPostBack) { BindSettings(); + + buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick"); } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMailFlowSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMailFlowSettings.ascx.designer.cs index 1ed59e75..f396c6b4 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMailFlowSettings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMailFlowSettings.ascx.designer.cs @@ -247,22 +247,13 @@ namespace WebsitePanel.Portal.ExchangeServer { protected global::System.Web.UI.WebControls.CheckBox chkPmmAllowed; /// - /// btnSave control. + /// buttonPanel control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btnSave; - - /// - /// btnSaveExit control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnSaveExit; + protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel; /// /// ValidationSummary1 control. diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx index 452914dc..0e144703 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx @@ -7,6 +7,7 @@ <%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> <%@ Register Src="UserControls/MailboxPlanSelector.ascx" TagName="MailboxPlanSelector" TagPrefix="wsp" %> <%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %> @@ -43,10 +44,8 @@
- - +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.designer.cs index 03c07ca6..91c01a76 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMemberOf.ascx.designer.cs @@ -103,22 +103,13 @@ namespace WebsitePanel.Portal.ExchangeServer { protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList groups; /// - /// btnSave control. + /// buttonPanel control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btnSave; - - /// - /// btnSaveExit control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnSaveExit; + protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel; /// /// ValidationSummary1 control. diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx index b296eac7..589f69f6 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx @@ -6,6 +6,7 @@ <%@ Register Src="UserControls/MailboxTabs.ascx" TagName="MailboxTabs" TagPrefix="wsp" %> <%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %> <%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %> @@ -44,9 +45,8 @@
- - +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs index 39eb5c30..94dff205 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs @@ -37,8 +37,12 @@ namespace WebsitePanel.Portal.ExchangeServer protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) + { BindPermissions(); + buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick"); + } + } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.designer.cs index 0c1e2494..886b9614 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.designer.cs @@ -139,21 +139,12 @@ namespace WebsitePanel.Portal.ExchangeServer { protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList fullAccessPermission; /// - /// btnSave control. + /// buttonPanel control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btnSave; - - /// - /// btnSaveExit control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnSaveExit; + protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel; } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx index cd770aea..a2d2032b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx @@ -13,6 +13,7 @@ <%@ Register src="UserControls/UserTabs.ascx" tagname="UserTabs" tagprefix="uc1" %> <%@ Register src="UserControls/MailboxTabs.ascx" tagname="MailboxTabs" tagprefix="uc1" %> +<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %> @@ -283,10 +284,8 @@
- - +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs index 865e8665..81a3cf85 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs @@ -49,6 +49,8 @@ namespace WebsitePanel.Portal.HostedSolution MailboxTabsId.Visible = (PanelRequest.Context == "Mailbox"); UserTabsId.Visible = (PanelRequest.Context == "User"); + + buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick"); } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.designer.cs index fef1a739..7c18c1d8 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.designer.cs @@ -769,22 +769,13 @@ namespace WebsitePanel.Portal.HostedSolution { protected global::System.Web.UI.WebControls.Label lblUserDomainName; /// - /// btnSave control. + /// buttonPanel control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btnSave; - - /// - /// btnSaveExit control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnSaveExit; + protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel; /// /// ValidationSummary1 control. diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx index a92bde4a..179955d0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx @@ -15,6 +15,7 @@ <%@ Register src="UserControls/UserTabs.ascx" tagname="UserTabs" tagprefix="uc1" %> <%@ Register src="UserControls/MailboxTabs.ascx" tagname="MailboxTabs" tagprefix="uc1" %> +<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %> @@ -54,10 +55,8 @@
- - +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.designer.cs index 89567bb0..a1f28695 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserMemberOf.ascx.designer.cs @@ -112,22 +112,13 @@ namespace WebsitePanel.Portal.HostedSolution { protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList groups; /// - /// btnSave control. + /// buttonPanel control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btnSave; - - /// - /// btnSaveExit control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnSaveExit; + protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel; /// /// ValidationSummary1 control. diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/ItemButtonPanel.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/ItemButtonPanel.ascx.resx new file mode 100644 index 00000000..33712da6 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/ItemButtonPanel.ascx.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Save Changes + + + Save Changes and Exit + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/ItemButtonPanel.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/ItemButtonPanel.ascx new file mode 100644 index 00000000..998c862b --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/ItemButtonPanel.ascx @@ -0,0 +1,5 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ItemButtonPanel.ascx.cs" Inherits="WebsitePanel.Portal.ItemButtonPanel" %> + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/ItemButtonPanel.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/ItemButtonPanel.ascx.cs new file mode 100644 index 00000000..50c284d4 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/ItemButtonPanel.ascx.cs @@ -0,0 +1,85 @@ +// Copyright (c) 2014, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; + +namespace WebsitePanel.Portal +{ + public partial class ItemButtonPanel : WebsitePanelControlBase + { + public bool ButtonSaveVisible + { + set { btnSave.Visible = value; } + get { return btnSave.Visible; } + } + + public bool ButtonSaveExitVisible + { + set { btnSaveExit.Visible = value; } + get { return btnSaveExit.Visible; } + } + + public string ValidationGroup + { + set { + btnSave.ValidationGroup = value; + btnSaveExit.ValidationGroup = value; + } + get { return btnSave.ValidationGroup; } + } + + public string OnSaveClientClick + { + set + { + btnSave.OnClientClick = value; + btnSaveExit.OnClientClick = value; + } + } + + + public event EventHandler SaveClick = null; + protected void btnSave_Click(object sender, EventArgs e) + { + if (SaveClick!=null) + { + SaveClick(this, e); + } + } + + public event EventHandler SaveExitClick = null; + protected void btnSaveExit_Click(object sender, EventArgs e) + { + if (SaveExitClick!=null) + { + SaveExitClick(this, e); + } + } + + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/ItemButtonPanel.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/ItemButtonPanel.ascx.designer.cs new file mode 100644 index 00000000..1cab6d5d --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/ItemButtonPanel.ascx.designer.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal { + + + public partial class ItemButtonPanel { + + /// + /// btnSave control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSave; + + /// + /// btnSaveExit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSaveExit; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj index 9d85192e..59d15f42 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj @@ -760,6 +760,13 @@ AllocatePackagePhoneNumbers.ascx + + ItemButtonPanel.ascx + ASPXCodeBehind + + + ItemButtonPanel.ascx + UserOrganization.ascx ASPXCodeBehind @@ -4302,6 +4309,7 @@ + @@ -5457,6 +5465,9 @@ Designer + + Designer + From 8d616552fed279fdb2721263043a1b60b8a1cedc Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Thu, 4 Dec 2014 14:35:20 +0400 Subject: [PATCH 39/42] wsp-10079 editing website properties returns you to wrong page. part 2 --- .../WebsitePanel_SharedResources.ascx.resx | 6 +++ .../DomainsEditDomain.ascx.resx | 12 ++---- .../WebSitesEditSite.ascx.resx | 8 +--- .../WebsitePanel/DomainsEditDomain.ascx | 6 +-- .../WebsitePanel/DomainsEditDomain.ascx.cs | 11 +++-- .../DomainsEditDomain.ascx.designer.cs | 16 ++------ .../ExchangeMailboxGeneralSettings.ascx.cs | 3 +- .../ExchangeMailboxMailFlowSettings.ascx.cs | 3 +- .../ExchangeMailboxPermissions.ascx.cs | 3 +- .../OrganizationUserGeneralSettings.ascx.cs | 3 +- .../WebsitePanel/WebSitesEditSite.ascx | 8 ++-- .../WebsitePanel/WebSitesEditSite.ascx.cs | 14 ++++--- .../WebSitesEditSite.ascx.designer.cs | 41 +------------------ 13 files changed, 46 insertions(+), 88 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx index 175a1e7d..1fee85f2 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -5608,4 +5608,10 @@ (equipment mailbox) + + Domain information has been successfully updated. + + + Web site has been successfully updated. + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsEditDomain.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsEditDomain.ascx.resx index f9ef6f4f..72437c36 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsEditDomain.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsEditDomain.ascx.resx @@ -112,24 +112,18 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Save - - - Cancel - Delete if(!confirm('Do you really want to delete this domain?')) return false;ShowProgressDialog('Deleting domain...'); - + ShowProgressDialog('Updating Domain...'); diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesEditSite.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesEditSite.ascx.resx index 7ef313a2..21e1cb0e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesEditSite.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/WebSitesEditSite.ascx.resx @@ -132,9 +132,6 @@ Create Directory - - Cancel - Change Password @@ -150,12 +147,9 @@ Uninstall - + ShowProgressDialog('Updating web site...'); - - Update - Continue Web Site diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsEditDomain.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsEditDomain.ascx index ab077baa..85fcb516 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsEditDomain.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsEditDomain.ascx @@ -1,6 +1,7 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DomainsEditDomain.ascx.cs" Inherits="WebsitePanel.Portal.DomainsEditDomain" %> <%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> <%@ Register Src="UserControls/CollapsiblePanel.ascx" TagPrefix="wsp" TagName="CollapsiblePanel" %> +<%@ Register Src="UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %> @@ -119,9 +120,8 @@
- - +
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsEditDomain.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsEditDomain.ascx.cs index f2249fce..a03b0ac3 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsEditDomain.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsEditDomain.ascx.cs @@ -48,6 +48,9 @@ namespace WebsitePanel.Portal if (!IsPostBack) { BindDomain(); + + if (GetLocalizedString("buttonPanel.OnSaveClientClick") != null) + buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick"); } } @@ -194,15 +197,13 @@ namespace WebsitePanel.Portal ShowResultMessage(result); return; } + ShowSuccessMessage("DOMAIN_UPDATE_DOMAIN"); } catch (Exception ex) { ShowErrorMessage("DOMAIN_UPDATE_DOMAIN", ex); return; } - - // return - RedirectSpaceHomePage(); } private void DeleteDomain() @@ -232,8 +233,10 @@ namespace WebsitePanel.Portal SaveDomain(); } - protected void btnCancel_Click(object sender, EventArgs e) + protected void btnSaveExit_Click(object sender, EventArgs e) { + SaveDomain(); + // return RedirectSpaceHomePage(); } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsEditDomain.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsEditDomain.ascx.designer.cs index 9fc907ea..b80a1857 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsEditDomain.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsEditDomain.ascx.designer.cs @@ -1,10 +1,9 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3074 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ @@ -428,22 +427,13 @@ namespace WebsitePanel.Portal { protected global::System.Web.UI.WebControls.Localize DescribeAllowSubDomains; /// - /// btnSave control. + /// buttonPanel control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btnSave; - - /// - /// btnCancel control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnCancel; + protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel; /// /// btnDelete control. 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 69b9139f..ff2dc086 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxGeneralSettings.ascx.cs @@ -82,7 +82,8 @@ namespace WebsitePanel.Portal.ExchangeServer secRetentionPolicy.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, Cntx); - buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick"); + if (GetLocalizedString("buttonPanel.OnSaveClientClick") != null) + buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick"); } int planId = -1; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMailFlowSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMailFlowSettings.ascx.cs index bd633f88..73d11805 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMailFlowSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxMailFlowSettings.ascx.cs @@ -50,7 +50,8 @@ namespace WebsitePanel.Portal.ExchangeServer { BindSettings(); - buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick"); + if (GetLocalizedString("buttonPanel.OnSaveClientClick") != null) + buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick"); } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs index 94dff205..6a63fbe4 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPermissions.ascx.cs @@ -40,7 +40,8 @@ namespace WebsitePanel.Portal.ExchangeServer { BindPermissions(); - buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick"); + if (GetLocalizedString("buttonPanel.OnSaveClientClick") != null) + buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick"); } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs index 81a3cf85..028a2e4d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs @@ -50,7 +50,8 @@ namespace WebsitePanel.Portal.HostedSolution MailboxTabsId.Visible = (PanelRequest.Context == "Mailbox"); UserTabsId.Visible = (PanelRequest.Context == "User"); - buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick"); + if (GetLocalizedString("buttonPanel.OnSaveClientClick") != null) + buttonPanel.OnSaveClientClick = GetLocalizedString("buttonPanel.OnSaveClientClick"); } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx index 0c6e28dd..a8fd47ff 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebSitesEditSite.ascx @@ -16,6 +16,8 @@ <%@ Register Src="UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %> <%@ Register TagPrefix="wsp" Namespace="WebsitePanel.Portal" %> <%@ Register Src="WebsitesSSL.ascx" TagName="WebsitesSSL" TagPrefix="uc2" %> +<%@ Register Src="UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %> +