This commit is contained in:
dev_amdtel 2015-02-03 00:24:00 +04:00
commit d3c54a3a15
301 changed files with 19979 additions and 8106 deletions

View file

@ -30,3 +30,4 @@ WebsitePanel/Sources/UpgradeLog.XML
WebsitePanel/Sources/UpgradeLog.htm
WebsitePanel/Sources/_UpgradeReport_Files/UpgradeReport_Information.png
WebsitePanel/Sources/_UpgradeReport_Files/UpgradeReport_Success.png
WebsitePanel/Sources/packages

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18408
// Runtime Version:4.0.30319.18051
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.

View file

@ -53,6 +53,8 @@ namespace WebsitePanel.SchedulerServiceInstaller
{
string testConnectionString = session["AUTHENTICATIONTYPE"].Equals("Windows Authentication") ? GetConnectionString(session["SERVERNAME"], "master") : GetConnectionString(session["SERVERNAME"], "master", session["LOGIN"], session["PASSWORD"]);
testConnectionString = testConnectionString.Replace(CustomDataDelimiter, ";");
if (CheckConnection(testConnectionString))
{
session["CORRECTCONNECTION"] = "1";

View file

@ -35236,12 +35236,15 @@ EXEC sp_xml_preparedocument @idoc OUTPUT, @XmlProperties
DELETE FROM ServiceItemProperties
WHERE ItemID = @ItemID
INSERT INTO ServiceItemProperties
(
ItemID,
PropertyName,
PropertyValue
)
-- Add the xml data into a temp table for the capability and robust
IF OBJECT_ID('tempdb..#TempTable') IS NOT NULL DROP TABLE #TempTable
CREATE TABLE #TempTable(
ItemID int,
PropertyName nvarchar(50),
PropertyValue nvarchar(3000))
INSERT INTO #TempTable (ItemID, PropertyName, PropertyValue)
SELECT
@ItemID,
PropertyName,
@ -35252,6 +35255,21 @@ FROM OPENXML(@idoc, '/properties/property',1) WITH
PropertyValue nvarchar(3000) '@value'
) as PV
-- Move data from temp table to real table
INSERT INTO ServiceItemProperties
(
ItemID,
PropertyName,
PropertyValue
)
SELECT
ItemID,
PropertyName,
PropertyValue
FROM #TempTable
DROP TABLE #TempTable
-- remove document
exec sp_xml_removedocument @idoc

File diff suppressed because it is too large Load diff

View file

@ -1,35 +1,7 @@
// Copyright (c) 2015, 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.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18051
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.

View file

@ -1,7 +1,7 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.18051
' Runtime Version:4.0.30319.34014
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.

View file

@ -326,6 +326,7 @@ namespace WebsitePanel.EnterpriseServer
public const int CURRENT_USER_IS_CRM_USER = -2708;
public const int CURRENT_USER_IS_OCS_USER = -2709;
public const int CURRENT_USER_IS_LYNC_USER = -2710;
public const int ERROR_DELETED_USERS_RESOURCE_QUOTA_LIMIT = -2711;
#endregion

View file

@ -0,0 +1,15 @@
using System;
namespace WebsitePanel.EnterpriseServer.Base.HostedSolution
{
public class WebDavAccessToken
{
public int Id { get; set; }
public string FilePath { get; set; }
public string AuthData { get; set; }
public Guid AccessToken { get; set; }
public DateTime ExpirationDate { get; set; }
public int AccountId { get; set; }
public int ItemId { get; set; }
}
}

View file

@ -52,6 +52,7 @@ namespace WebsitePanel.EnterpriseServer
int diskSpaceQuota;
int bandWidthQuota;
bool overrideQuotas;
bool defaultTopPackage;
HostingPlanGroupInfo[] groups;
HostingPlanQuotaInfo[] quotas;
@ -155,6 +156,12 @@ namespace WebsitePanel.EnterpriseServer
set { this.overrideQuotas = value; }
}
public bool DefaultTopPackage
{
get { return this.defaultTopPackage; }
set { this.defaultTopPackage = value; }
}
public HostingPlanGroupInfo[] Groups
{
get { return this.groups; }

View file

@ -161,6 +161,8 @@ order by rg.groupOrder
public const string STATS_SITES = "Stats.Sites"; // Statistics Sites
public const string ORGANIZATIONS = "HostedSolution.Organizations";
public const string ORGANIZATION_USERS = "HostedSolution.Users";
public const string ORGANIZATION_DELETED_USERS = "HostedSolution.DeletedUsers";
public const string ORGANIZATION_DELETED_USERS_BACKUP_STORAGE_SPACE = "HostedSolution.DeletedUsersBackupStorageSpace";
public const string ORGANIZATION_DOMAINS = "HostedSolution.Domains";
public const string ORGANIZATION_ALLOWCHANGEUPN = "HostedSolution.AllowChangeUPN";
public const string ORGANIZATION_SECURITYGROUPS = "HostedSolution.SecurityGroups";
@ -262,5 +264,6 @@ order by rg.groupOrder
public const string RDS_USERS = "RDS.Users";
public const string RDS_SERVERS = "RDS.Servers";
public const string RDS_COLLECTIONS = "RDS.Collections";
}
}

View file

@ -43,6 +43,7 @@ namespace WebsitePanel.EnterpriseServer
public const string SETUP_SETTINGS = "SetupSettings";
public const string WPI_SETTINGS = "WpiSettings";
public const string FILEMANAGER_SETTINGS = "FileManagerSettings";
public const string PACKAGE_DISPLAY_SETTINGS = "PackageDisplaySettings";
// key to access to wpi main & custom feed in wpi settings
public const string WPI_MAIN_FEED_KEY = "WpiMainFeedUrl";

View file

@ -120,6 +120,7 @@
<Compile Include="HostedSolution\ServiceLevel.cs" />
<Compile Include="HostedSolution\CRMLycenseTypes.cs" />
<Compile Include="HostedSolution\ESPermission.cs" />
<Compile Include="HostedSolution\WebDavAccessToken.cs" />
<Compile Include="Log\LogRecord.cs" />
<Compile Include="Packages\ServiceLevelQuotaValueInfo.cs" />
<Compile Include="Packages\HostingPlanContext.cs" />

View file

@ -19,10 +19,10 @@ namespace WebsitePanel.EnterpriseServer {
using System;
using System.Diagnostics;
using System.Data;
using WebsitePanel.Providers;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers;
/// <remarks/>
@ -34,6 +34,10 @@ namespace WebsitePanel.EnterpriseServer {
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))]
public partial class esExchangeServer : Microsoft.Web.Services3.WebServicesClientProtocol {
private System.Threading.SendOrPostCallback DeleteDistributionListMemberOperationCompleted;
private System.Threading.SendOrPostCallback GetMobileDevicesOperationCompleted;
private System.Threading.SendOrPostCallback GetMobileDeviceOperationCompleted;
private System.Threading.SendOrPostCallback WipeDataFromDeviceOperationCompleted;
@ -196,6 +200,10 @@ namespace WebsitePanel.EnterpriseServer {
private System.Threading.SendOrPostCallback SetMailboxPermissionsOperationCompleted;
private System.Threading.SendOrPostCallback ExportMailBoxOperationCompleted;
private System.Threading.SendOrPostCallback SetDeletedMailboxOperationCompleted;
private System.Threading.SendOrPostCallback CreateContactOperationCompleted;
private System.Threading.SendOrPostCallback DeleteContactOperationCompleted;
@ -236,15 +244,17 @@ namespace WebsitePanel.EnterpriseServer {
private System.Threading.SendOrPostCallback AddDistributionListMemberOperationCompleted;
private System.Threading.SendOrPostCallback DeleteDistributionListMemberOperationCompleted;
private System.Threading.SendOrPostCallback GetMobileDevicesOperationCompleted;
/// <remarks/>
public esExchangeServer() {
this.Url = "http://localhost:9002/esExchangeServer.asmx";
}
/// <remarks/>
public event DeleteDistributionListMemberCompletedEventHandler DeleteDistributionListMemberCompleted;
/// <remarks/>
public event GetMobileDevicesCompletedEventHandler GetMobileDevicesCompleted;
/// <remarks/>
public event GetMobileDeviceCompletedEventHandler GetMobileDeviceCompleted;
@ -488,6 +498,12 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/>
public event SetMailboxPermissionsCompletedEventHandler SetMailboxPermissionsCompleted;
/// <remarks/>
public event ExportMailBoxCompletedEventHandler ExportMailBoxCompleted;
/// <remarks/>
public event SetDeletedMailboxCompletedEventHandler SetDeletedMailboxCompleted;
/// <remarks/>
public event CreateContactCompletedEventHandler CreateContactCompleted;
@ -549,10 +565,95 @@ namespace WebsitePanel.EnterpriseServer {
public event AddDistributionListMemberCompletedEventHandler AddDistributionListMemberCompleted;
/// <remarks/>
public event DeleteDistributionListMemberCompletedEventHandler DeleteDistributionListMemberCompleted;
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDistributionListMember", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int DeleteDistributionListMember(int itemId, string distributionListName, int memberId) {
object[] results = this.Invoke("DeleteDistributionListMember", new object[] {
itemId,
distributionListName,
memberId});
return ((int)(results[0]));
}
/// <remarks/>
public event GetMobileDevicesCompletedEventHandler GetMobileDevicesCompleted;
public System.IAsyncResult BeginDeleteDistributionListMember(int itemId, string distributionListName, int memberId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DeleteDistributionListMember", new object[] {
itemId,
distributionListName,
memberId}, callback, asyncState);
}
/// <remarks/>
public int EndDeleteDistributionListMember(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
/// <remarks/>
public void DeleteDistributionListMemberAsync(int itemId, string distributionListName, int memberId) {
this.DeleteDistributionListMemberAsync(itemId, distributionListName, memberId, null);
}
/// <remarks/>
public void DeleteDistributionListMemberAsync(int itemId, string distributionListName, int memberId, object userState) {
if ((this.DeleteDistributionListMemberOperationCompleted == null)) {
this.DeleteDistributionListMemberOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteDistributionListMemberOperationCompleted);
}
this.InvokeAsync("DeleteDistributionListMember", new object[] {
itemId,
distributionListName,
memberId}, this.DeleteDistributionListMemberOperationCompleted, userState);
}
private void OnDeleteDistributionListMemberOperationCompleted(object arg) {
if ((this.DeleteDistributionListMemberCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteDistributionListMemberCompleted(this, new DeleteDistributionListMemberCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMobileDevices", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ExchangeMobileDevice[] GetMobileDevices(int itemId, int accountId) {
object[] results = this.Invoke("GetMobileDevices", new object[] {
itemId,
accountId});
return ((ExchangeMobileDevice[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetMobileDevices(int itemId, int accountId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetMobileDevices", new object[] {
itemId,
accountId}, callback, asyncState);
}
/// <remarks/>
public ExchangeMobileDevice[] EndGetMobileDevices(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ExchangeMobileDevice[])(results[0]));
}
/// <remarks/>
public void GetMobileDevicesAsync(int itemId, int accountId) {
this.GetMobileDevicesAsync(itemId, accountId, null);
}
/// <remarks/>
public void GetMobileDevicesAsync(int itemId, int accountId, object userState) {
if ((this.GetMobileDevicesOperationCompleted == null)) {
this.GetMobileDevicesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMobileDevicesOperationCompleted);
}
this.InvokeAsync("GetMobileDevices", new object[] {
itemId,
accountId}, this.GetMobileDevicesOperationCompleted, userState);
}
private void OnGetMobileDevicesOperationCompleted(object arg) {
if ((this.GetMobileDevicesCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetMobileDevicesCompleted(this, new GetMobileDevicesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMobileDevice", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@ -4458,6 +4559,97 @@ namespace WebsitePanel.EnterpriseServer {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/ExportMailBox", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int ExportMailBox(int itemId, int accountId, string path) {
object[] results = this.Invoke("ExportMailBox", new object[] {
itemId,
accountId,
path});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginExportMailBox(int itemId, int accountId, string path, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("ExportMailBox", new object[] {
itemId,
accountId,
path}, callback, asyncState);
}
/// <remarks/>
public int EndExportMailBox(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
/// <remarks/>
public void ExportMailBoxAsync(int itemId, int accountId, string path) {
this.ExportMailBoxAsync(itemId, accountId, path, null);
}
/// <remarks/>
public void ExportMailBoxAsync(int itemId, int accountId, string path, object userState) {
if ((this.ExportMailBoxOperationCompleted == null)) {
this.ExportMailBoxOperationCompleted = new System.Threading.SendOrPostCallback(this.OnExportMailBoxOperationCompleted);
}
this.InvokeAsync("ExportMailBox", new object[] {
itemId,
accountId,
path}, this.ExportMailBoxOperationCompleted, userState);
}
private void OnExportMailBoxOperationCompleted(object arg) {
if ((this.ExportMailBoxCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.ExportMailBoxCompleted(this, new ExportMailBoxCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDeletedMailbox", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int SetDeletedMailbox(int itemId, int accountId) {
object[] results = this.Invoke("SetDeletedMailbox", new object[] {
itemId,
accountId});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginSetDeletedMailbox(int itemId, int accountId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("SetDeletedMailbox", new object[] {
itemId,
accountId}, callback, asyncState);
}
/// <remarks/>
public int EndSetDeletedMailbox(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
/// <remarks/>
public void SetDeletedMailboxAsync(int itemId, int accountId) {
this.SetDeletedMailboxAsync(itemId, accountId, null);
}
/// <remarks/>
public void SetDeletedMailboxAsync(int itemId, int accountId, object userState) {
if ((this.SetDeletedMailboxOperationCompleted == null)) {
this.SetDeletedMailboxOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDeletedMailboxOperationCompleted);
}
this.InvokeAsync("SetDeletedMailbox", new object[] {
itemId,
accountId}, this.SetDeletedMailboxOperationCompleted, userState);
}
private void OnSetDeletedMailboxOperationCompleted(object arg) {
if ((this.SetDeletedMailboxCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SetDeletedMailboxCompleted(this, new SetDeletedMailboxCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateContact", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int CreateContact(int itemId, string displayName, string email) {
@ -5582,103 +5774,64 @@ namespace WebsitePanel.EnterpriseServer {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDistributionListMember", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int DeleteDistributionListMember(int itemId, string distributionListName, int memberId) {
object[] results = this.Invoke("DeleteDistributionListMember", new object[] {
itemId,
distributionListName,
memberId});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginDeleteDistributionListMember(int itemId, string distributionListName, int memberId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DeleteDistributionListMember", new object[] {
itemId,
distributionListName,
memberId}, callback, asyncState);
}
/// <remarks/>
public int EndDeleteDistributionListMember(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
/// <remarks/>
public void DeleteDistributionListMemberAsync(int itemId, string distributionListName, int memberId) {
this.DeleteDistributionListMemberAsync(itemId, distributionListName, memberId, null);
}
/// <remarks/>
public void DeleteDistributionListMemberAsync(int itemId, string distributionListName, int memberId, object userState) {
if ((this.DeleteDistributionListMemberOperationCompleted == null)) {
this.DeleteDistributionListMemberOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteDistributionListMemberOperationCompleted);
}
this.InvokeAsync("DeleteDistributionListMember", new object[] {
itemId,
distributionListName,
memberId}, this.DeleteDistributionListMemberOperationCompleted, userState);
}
private void OnDeleteDistributionListMemberOperationCompleted(object arg) {
if ((this.DeleteDistributionListMemberCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteDistributionListMemberCompleted(this, new DeleteDistributionListMemberCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMobileDevices", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ExchangeMobileDevice[] GetMobileDevices(int itemId, int accountId) {
object[] results = this.Invoke("GetMobileDevices", new object[] {
itemId,
accountId});
return ((ExchangeMobileDevice[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetMobileDevices(int itemId, int accountId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetMobileDevices", new object[] {
itemId,
accountId}, callback, asyncState);
}
/// <remarks/>
public ExchangeMobileDevice[] EndGetMobileDevices(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ExchangeMobileDevice[])(results[0]));
}
/// <remarks/>
public void GetMobileDevicesAsync(int itemId, int accountId) {
this.GetMobileDevicesAsync(itemId, accountId, null);
}
/// <remarks/>
public void GetMobileDevicesAsync(int itemId, int accountId, object userState) {
if ((this.GetMobileDevicesOperationCompleted == null)) {
this.GetMobileDevicesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMobileDevicesOperationCompleted);
}
this.InvokeAsync("GetMobileDevices", new object[] {
itemId,
accountId}, this.GetMobileDevicesOperationCompleted, userState);
}
private void OnGetMobileDevicesOperationCompleted(object arg) {
if ((this.GetMobileDevicesCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetMobileDevicesCompleted(this, new GetMobileDevicesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteDistributionListMemberCompletedEventHandler(object sender, DeleteDistributionListMemberCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteDistributionListMemberCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal DeleteDistributionListMemberCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int Result {
get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetMobileDevicesCompletedEventHandler(object sender, GetMobileDevicesCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetMobileDevicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetMobileDevicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ExchangeMobileDevice[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((ExchangeMobileDevice[])(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetMobileDeviceCompletedEventHandler(object sender, GetMobileDeviceCompletedEventArgs e);
@ -7697,6 +7850,58 @@ namespace WebsitePanel.EnterpriseServer {
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void ExportMailBoxCompletedEventHandler(object sender, ExportMailBoxCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class ExportMailBoxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal ExportMailBoxCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int Result {
get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SetDeletedMailboxCompletedEventHandler(object sender, SetDeletedMailboxCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SetDeletedMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal SetDeletedMailboxCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int Result {
get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void CreateContactCompletedEventHandler(object sender, CreateContactCompletedEventArgs e);
@ -8216,56 +8421,4 @@ namespace WebsitePanel.EnterpriseServer {
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteDistributionListMemberCompletedEventHandler(object sender, DeleteDistributionListMemberCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteDistributionListMemberCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal DeleteDistributionListMemberCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int Result {
get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetMobileDevicesCompletedEventHandler(object sender, GetMobileDevicesCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetMobileDevicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetMobileDevicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ExchangeMobileDevice[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((ExchangeMobileDevice[])(this.results[0]));
}
}
}
}

View file

@ -20,10 +20,11 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
using System.Diagnostics;
using System.Data;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.Common;
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers;
using WebsitePanel.Providers.Common;
/// <remarks/>
@ -78,6 +79,8 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
private System.Threading.SendOrPostCallback ImportUserOperationCompleted;
private System.Threading.SendOrPostCallback GetOrganizationDeletedUsersPagedOperationCompleted;
private System.Threading.SendOrPostCallback GetOrganizationUsersPagedOperationCompleted;
private System.Threading.SendOrPostCallback GetUserGeneralSettingsOperationCompleted;
@ -90,6 +93,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
private System.Threading.SendOrPostCallback SearchAccountsOperationCompleted;
private System.Threading.SendOrPostCallback SetDeletedUserOperationCompleted;
private System.Threading.SendOrPostCallback GetArchiveFileBinaryChunkOperationCompleted;
private System.Threading.SendOrPostCallback DeleteUserOperationCompleted;
private System.Threading.SendOrPostCallback GetPasswordPolicyOperationCompleted;
@ -201,6 +208,9 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
/// <remarks/>
public event ImportUserCompletedEventHandler ImportUserCompleted;
/// <remarks/>
public event GetOrganizationDeletedUsersPagedCompletedEventHandler GetOrganizationDeletedUsersPagedCompleted;
/// <remarks/>
public event GetOrganizationUsersPagedCompletedEventHandler GetOrganizationUsersPagedCompleted;
@ -219,6 +229,12 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
/// <remarks/>
public event SearchAccountsCompletedEventHandler SearchAccountsCompleted;
/// <remarks/>
public event SetDeletedUserCompletedEventHandler SetDeletedUserCompleted;
/// <remarks/>
public event GetArchiveFileBinaryChunkCompletedEventHandler GetArchiveFileBinaryChunkCompleted;
/// <remarks/>
public event DeleteUserCompletedEventHandler DeleteUserCompleted;
@ -1299,6 +1315,62 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationDeletedUsersPaged", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public OrganizationDeletedUsersPaged GetOrganizationDeletedUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) {
object[] results = this.Invoke("GetOrganizationDeletedUsersPaged", new object[] {
itemId,
filterColumn,
filterValue,
sortColumn,
startRow,
maximumRows});
return ((OrganizationDeletedUsersPaged)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetOrganizationDeletedUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetOrganizationDeletedUsersPaged", new object[] {
itemId,
filterColumn,
filterValue,
sortColumn,
startRow,
maximumRows}, callback, asyncState);
}
/// <remarks/>
public OrganizationDeletedUsersPaged EndGetOrganizationDeletedUsersPaged(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((OrganizationDeletedUsersPaged)(results[0]));
}
/// <remarks/>
public void GetOrganizationDeletedUsersPagedAsync(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) {
this.GetOrganizationDeletedUsersPagedAsync(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows, null);
}
/// <remarks/>
public void GetOrganizationDeletedUsersPagedAsync(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) {
if ((this.GetOrganizationDeletedUsersPagedOperationCompleted == null)) {
this.GetOrganizationDeletedUsersPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationDeletedUsersPagedOperationCompleted);
}
this.InvokeAsync("GetOrganizationDeletedUsersPaged", new object[] {
itemId,
filterColumn,
filterValue,
sortColumn,
startRow,
maximumRows}, this.GetOrganizationDeletedUsersPagedOperationCompleted, userState);
}
private void OnGetOrganizationDeletedUsersPagedOperationCompleted(object arg) {
if ((this.GetOrganizationDeletedUsersPagedCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetOrganizationDeletedUsersPagedCompleted(this, new GetOrganizationDeletedUsersPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationUsersPaged", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public OrganizationUsersPaged GetOrganizationUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) {
@ -1807,6 +1879,104 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetDeletedUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int SetDeletedUser(int itemId, int accountId, bool enableForceArchive) {
object[] results = this.Invoke("SetDeletedUser", new object[] {
itemId,
accountId,
enableForceArchive});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginSetDeletedUser(int itemId, int accountId, bool enableForceArchive, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("SetDeletedUser", new object[] {
itemId,
accountId,
enableForceArchive}, callback, asyncState);
}
/// <remarks/>
public int EndSetDeletedUser(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
/// <remarks/>
public void SetDeletedUserAsync(int itemId, int accountId, bool enableForceArchive) {
this.SetDeletedUserAsync(itemId, accountId, enableForceArchive, null);
}
/// <remarks/>
public void SetDeletedUserAsync(int itemId, int accountId, bool enableForceArchive, object userState) {
if ((this.SetDeletedUserOperationCompleted == null)) {
this.SetDeletedUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDeletedUserOperationCompleted);
}
this.InvokeAsync("SetDeletedUser", new object[] {
itemId,
accountId,
enableForceArchive}, this.SetDeletedUserOperationCompleted, userState);
}
private void OnSetDeletedUserOperationCompleted(object arg) {
if ((this.SetDeletedUserCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SetDeletedUserCompleted(this, new SetDeletedUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetArchiveFileBinaryChunk", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[return: System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
public byte[] GetArchiveFileBinaryChunk(int packageId, string path, int offset, int length) {
object[] results = this.Invoke("GetArchiveFileBinaryChunk", new object[] {
packageId,
path,
offset,
length});
return ((byte[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetArchiveFileBinaryChunk(int packageId, string path, int offset, int length, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetArchiveFileBinaryChunk", new object[] {
packageId,
path,
offset,
length}, callback, asyncState);
}
/// <remarks/>
public byte[] EndGetArchiveFileBinaryChunk(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((byte[])(results[0]));
}
/// <remarks/>
public void GetArchiveFileBinaryChunkAsync(int packageId, string path, int offset, int length) {
this.GetArchiveFileBinaryChunkAsync(packageId, path, offset, length, null);
}
/// <remarks/>
public void GetArchiveFileBinaryChunkAsync(int packageId, string path, int offset, int length, object userState) {
if ((this.GetArchiveFileBinaryChunkOperationCompleted == null)) {
this.GetArchiveFileBinaryChunkOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetArchiveFileBinaryChunkOperationCompleted);
}
this.InvokeAsync("GetArchiveFileBinaryChunk", new object[] {
packageId,
path,
offset,
length}, this.GetArchiveFileBinaryChunkOperationCompleted, userState);
}
private void OnGetArchiveFileBinaryChunkOperationCompleted(object arg) {
if ((this.GetArchiveFileBinaryChunkCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetArchiveFileBinaryChunkCompleted(this, new GetArchiveFileBinaryChunkCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int DeleteUser(int itemId, int accountId) {
@ -3255,6 +3425,32 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetOrganizationDeletedUsersPagedCompletedEventHandler(object sender, GetOrganizationDeletedUsersPagedCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetOrganizationDeletedUsersPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetOrganizationDeletedUsersPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public OrganizationDeletedUsersPaged Result {
get {
this.RaiseExceptionIfNecessary();
return ((OrganizationDeletedUsersPaged)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetOrganizationUsersPagedCompletedEventHandler(object sender, GetOrganizationUsersPagedCompletedEventArgs e);
@ -3411,6 +3607,58 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SetDeletedUserCompletedEventHandler(object sender, SetDeletedUserCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SetDeletedUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal SetDeletedUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int Result {
get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetArchiveFileBinaryChunkCompletedEventHandler(object sender, GetArchiveFileBinaryChunkCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetArchiveFileBinaryChunkCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetArchiveFileBinaryChunkCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public byte[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((byte[])(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteUserCompletedEventHandler(object sender, DeleteUserCompletedEventArgs e);

View file

@ -1,35 +1,7 @@
// Copyright (c) 2015, 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.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.6387
// Runtime Version:2.0.50727.8009
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -37,7 +9,7 @@
//------------------------------------------------------------------------------
//
// This source code was auto-generated by wsdl, Version=2.0.50727.3038.
// This source code was auto-generated by wsdl, Version=2.0.50727.42.
//
namespace WebsitePanel.EnterpriseServer {
using System.Xml.Serialization;
@ -50,7 +22,7 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="esPackagesSoap", Namespace="http://smbsaas/websitepanel/enterpriseserver")]
@ -120,6 +92,8 @@ namespace WebsitePanel.EnterpriseServer {
private System.Threading.SendOrPostCallback UpdatePackageSettingsOperationCompleted;
private System.Threading.SendOrPostCallback SetDefaultTopPackageOperationCompleted;
private System.Threading.SendOrPostCallback GetPackageAddonsOperationCompleted;
private System.Threading.SendOrPostCallback GetPackageAddonOperationCompleted;
@ -277,6 +251,9 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/>
public event UpdatePackageSettingsCompletedEventHandler UpdatePackageSettingsCompleted;
/// <remarks/>
public event SetDefaultTopPackageCompletedEventHandler SetDefaultTopPackageCompleted;
/// <remarks/>
public event GetPackageAddonsCompletedEventHandler GetPackageAddonsCompleted;
@ -1781,6 +1758,50 @@ namespace WebsitePanel.EnterpriseServer {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDefaultTopPackage", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public bool SetDefaultTopPackage(int userId, int packageId) {
object[] results = this.Invoke("SetDefaultTopPackage", new object[] {
userId,
packageId});
return ((bool)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginSetDefaultTopPackage(int userId, int packageId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("SetDefaultTopPackage", new object[] {
userId,
packageId}, callback, asyncState);
}
/// <remarks/>
public bool EndSetDefaultTopPackage(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((bool)(results[0]));
}
/// <remarks/>
public void SetDefaultTopPackageAsync(int userId, int packageId) {
this.SetDefaultTopPackageAsync(userId, packageId, null);
}
/// <remarks/>
public void SetDefaultTopPackageAsync(int userId, int packageId, object userState) {
if ((this.SetDefaultTopPackageOperationCompleted == null)) {
this.SetDefaultTopPackageOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDefaultTopPackageOperationCompleted);
}
this.InvokeAsync("SetDefaultTopPackage", new object[] {
userId,
packageId}, this.SetDefaultTopPackageOperationCompleted, userState);
}
private void OnSetDefaultTopPackageOperationCompleted(object arg) {
if ((this.SetDefaultTopPackageCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SetDefaultTopPackageCompleted(this, new SetDefaultTopPackageCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPackageAddons", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public System.Data.DataSet GetPackageAddons(int packageId) {
@ -3260,11 +3281,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetHostingPlansCompletedEventHandler(object sender, GetHostingPlansCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetHostingPlansCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3286,11 +3307,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetHostingAddonsCompletedEventHandler(object sender, GetHostingAddonsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetHostingAddonsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3312,11 +3333,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetHostingPlanCompletedEventHandler(object sender, GetHostingPlanCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetHostingPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3338,11 +3359,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetHostingPlanQuotasCompletedEventHandler(object sender, GetHostingPlanQuotasCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetHostingPlanQuotasCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3364,11 +3385,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetHostingPlanContextCompletedEventHandler(object sender, GetHostingPlanContextCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetHostingPlanContextCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3390,11 +3411,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetUserAvailableHostingPlansCompletedEventHandler(object sender, GetUserAvailableHostingPlansCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetUserAvailableHostingPlansCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3416,11 +3437,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetUserAvailableHostingAddonsCompletedEventHandler(object sender, GetUserAvailableHostingAddonsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetUserAvailableHostingAddonsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3442,11 +3463,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void AddHostingPlanCompletedEventHandler(object sender, AddHostingPlanCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class AddHostingPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3468,11 +3489,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void UpdateHostingPlanCompletedEventHandler(object sender, UpdateHostingPlanCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class UpdateHostingPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3494,11 +3515,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void DeleteHostingPlanCompletedEventHandler(object sender, DeleteHostingPlanCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteHostingPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3520,11 +3541,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetPackagesCompletedEventHandler(object sender, GetPackagesCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetPackagesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3546,11 +3567,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetNestedPackagesSummaryCompletedEventHandler(object sender, GetNestedPackagesSummaryCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetNestedPackagesSummaryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3572,11 +3593,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetRawPackagesCompletedEventHandler(object sender, GetRawPackagesCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetRawPackagesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3598,11 +3619,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void SearchServiceItemsPagedCompletedEventHandler(object sender, SearchServiceItemsPagedCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SearchServiceItemsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3624,11 +3645,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetPackagesPagedCompletedEventHandler(object sender, GetPackagesPagedCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetPackagesPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3650,11 +3671,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetNestedPackagesPagedCompletedEventHandler(object sender, GetNestedPackagesPagedCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetNestedPackagesPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3676,11 +3697,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetPackagePackagesCompletedEventHandler(object sender, GetPackagePackagesCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetPackagePackagesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3702,11 +3723,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetMyPackagesCompletedEventHandler(object sender, GetMyPackagesCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetMyPackagesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3728,11 +3749,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetRawMyPackagesCompletedEventHandler(object sender, GetRawMyPackagesCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetRawMyPackagesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3754,11 +3775,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetPackageCompletedEventHandler(object sender, GetPackageCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetPackageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3780,11 +3801,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetPackageContextCompletedEventHandler(object sender, GetPackageContextCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetPackageContextCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3806,11 +3827,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetPackageQuotasCompletedEventHandler(object sender, GetPackageQuotasCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetPackageQuotasCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3832,11 +3853,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetPackageQuotasForEditCompletedEventHandler(object sender, GetPackageQuotasForEditCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetPackageQuotasForEditCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3858,11 +3879,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void AddPackageCompletedEventHandler(object sender, AddPackageCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class AddPackageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3884,11 +3905,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void UpdatePackageCompletedEventHandler(object sender, UpdatePackageCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class UpdatePackageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3910,11 +3931,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void UpdatePackageLiteralCompletedEventHandler(object sender, UpdatePackageLiteralCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class UpdatePackageLiteralCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3936,11 +3957,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void UpdatePackageNameCompletedEventHandler(object sender, UpdatePackageNameCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class UpdatePackageNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3962,11 +3983,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void DeletePackageCompletedEventHandler(object sender, DeletePackageCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeletePackageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -3988,11 +4009,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void ChangePackageStatusCompletedEventHandler(object sender, ChangePackageStatusCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class ChangePackageStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4014,11 +4035,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void EvaluateUserPackageTempateCompletedEventHandler(object sender, EvaluateUserPackageTempateCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class EvaluateUserPackageTempateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4040,11 +4061,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetPackageSettingsCompletedEventHandler(object sender, GetPackageSettingsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetPackageSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4066,11 +4087,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void UpdatePackageSettingsCompletedEventHandler(object sender, UpdatePackageSettingsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class UpdatePackageSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4092,11 +4113,37 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void SetDefaultTopPackageCompletedEventHandler(object sender, SetDefaultTopPackageCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SetDefaultTopPackageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal SetDefaultTopPackageCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public bool Result {
get {
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetPackageAddonsCompletedEventHandler(object sender, GetPackageAddonsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetPackageAddonsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4118,11 +4165,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetPackageAddonCompletedEventHandler(object sender, GetPackageAddonCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetPackageAddonCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4144,11 +4191,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void AddPackageAddonByIdCompletedEventHandler(object sender, AddPackageAddonByIdCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class AddPackageAddonByIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4170,11 +4217,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void AddPackageAddonCompletedEventHandler(object sender, AddPackageAddonCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class AddPackageAddonCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4196,11 +4243,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void AddPackageAddonLiteralCompletedEventHandler(object sender, AddPackageAddonLiteralCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class AddPackageAddonLiteralCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4222,11 +4269,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void UpdatePackageAddonCompletedEventHandler(object sender, UpdatePackageAddonCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class UpdatePackageAddonCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4248,11 +4295,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void UpdatePackageAddonLiteralCompletedEventHandler(object sender, UpdatePackageAddonLiteralCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class UpdatePackageAddonLiteralCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4274,11 +4321,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void DeletePackageAddonCompletedEventHandler(object sender, DeletePackageAddonCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeletePackageAddonCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4300,11 +4347,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetSearchableServiceItemTypesCompletedEventHandler(object sender, GetSearchableServiceItemTypesCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetSearchableServiceItemTypesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4326,11 +4373,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetRawPackageItemsByTypeCompletedEventHandler(object sender, GetRawPackageItemsByTypeCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetRawPackageItemsByTypeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4352,11 +4399,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetRawPackageItemsPagedCompletedEventHandler(object sender, GetRawPackageItemsPagedCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetRawPackageItemsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4378,11 +4425,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetRawPackageItemsCompletedEventHandler(object sender, GetRawPackageItemsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetRawPackageItemsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4404,11 +4451,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void DetachPackageItemCompletedEventHandler(object sender, DetachPackageItemCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DetachPackageItemCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4430,11 +4477,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void MovePackageItemCompletedEventHandler(object sender, MovePackageItemCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class MovePackageItemCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4456,11 +4503,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetPackageQuotaCompletedEventHandler(object sender, GetPackageQuotaCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetPackageQuotaCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4482,11 +4529,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void SendAccountSummaryLetterCompletedEventHandler(object sender, SendAccountSummaryLetterCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SendAccountSummaryLetterCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4508,11 +4555,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void SendPackageSummaryLetterCompletedEventHandler(object sender, SendPackageSummaryLetterCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SendPackageSummaryLetterCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4534,11 +4581,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetEvaluatedPackageTemplateBodyCompletedEventHandler(object sender, GetEvaluatedPackageTemplateBodyCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetEvaluatedPackageTemplateBodyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4560,11 +4607,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetEvaluatedAccountTemplateBodyCompletedEventHandler(object sender, GetEvaluatedAccountTemplateBodyCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetEvaluatedAccountTemplateBodyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4586,11 +4633,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void AddPackageWithResourcesCompletedEventHandler(object sender, AddPackageWithResourcesCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class AddPackageWithResourcesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4612,11 +4659,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void CreateUserWizardCompletedEventHandler(object sender, CreateUserWizardCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CreateUserWizardCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4638,11 +4685,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetPackagesBandwidthPagedCompletedEventHandler(object sender, GetPackagesBandwidthPagedCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetPackagesBandwidthPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4664,11 +4711,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetPackagesDiskspacePagedCompletedEventHandler(object sender, GetPackagesDiskspacePagedCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetPackagesDiskspacePagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4690,11 +4737,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetPackageBandwidthCompletedEventHandler(object sender, GetPackageBandwidthCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetPackageBandwidthCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4716,11 +4763,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetPackageDiskspaceCompletedEventHandler(object sender, GetPackageDiskspaceCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetPackageDiskspaceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4742,11 +4789,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetOverusageSummaryReportCompletedEventHandler(object sender, GetOverusageSummaryReportCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetOverusageSummaryReportCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4768,11 +4815,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetDiskspaceOverusageDetailsReportCompletedEventHandler(object sender, GetDiskspaceOverusageDetailsReportCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetDiskspaceOverusageDetailsReportCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -4794,11 +4841,11 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetBandwidthOverusageDetailsReportCompletedEventHandler(object sender, GetBandwidthOverusageDetailsReportCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetBandwidthOverusageDetailsReportCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
@ -60,12 +32,16 @@ namespace WebsitePanel.EnterpriseServer {
private System.Threading.SendOrPostCallback GetRdsCollectionOperationCompleted;
private System.Threading.SendOrPostCallback GetRdsCollectionSettingsOperationCompleted;
private System.Threading.SendOrPostCallback GetOrganizationRdsCollectionsOperationCompleted;
private System.Threading.SendOrPostCallback AddRdsCollectionOperationCompleted;
private System.Threading.SendOrPostCallback EditRdsCollectionOperationCompleted;
private System.Threading.SendOrPostCallback EditRdsCollectionSettingsOperationCompleted;
private System.Threading.SendOrPostCallback GetRdsCollectionsPagedOperationCompleted;
private System.Threading.SendOrPostCallback RemoveRdsCollectionOperationCompleted;
@ -116,10 +92,20 @@ namespace WebsitePanel.EnterpriseServer {
private System.Threading.SendOrPostCallback GetOrganizationRdsUsersCountOperationCompleted;
private System.Threading.SendOrPostCallback GetOrganizationRdsServersCountOperationCompleted;
private System.Threading.SendOrPostCallback GetOrganizationRdsCollectionsCountOperationCompleted;
private System.Threading.SendOrPostCallback GetApplicationUsersOperationCompleted;
private System.Threading.SendOrPostCallback SetApplicationUsersOperationCompleted;
private System.Threading.SendOrPostCallback GetRdsUserSessionsOperationCompleted;
private System.Threading.SendOrPostCallback LogOffRdsUserOperationCompleted;
private System.Threading.SendOrPostCallback GetRdsCollectionSessionHostsOperationCompleted;
/// <remarks/>
public esRemoteDesktopServices() {
this.Url = "http://localhost:9002/esRemoteDesktopServices.asmx";
@ -128,6 +114,9 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/>
public event GetRdsCollectionCompletedEventHandler GetRdsCollectionCompleted;
/// <remarks/>
public event GetRdsCollectionSettingsCompletedEventHandler GetRdsCollectionSettingsCompleted;
/// <remarks/>
public event GetOrganizationRdsCollectionsCompletedEventHandler GetOrganizationRdsCollectionsCompleted;
@ -137,6 +126,9 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/>
public event EditRdsCollectionCompletedEventHandler EditRdsCollectionCompleted;
/// <remarks/>
public event EditRdsCollectionSettingsCompletedEventHandler EditRdsCollectionSettingsCompleted;
/// <remarks/>
public event GetRdsCollectionsPagedCompletedEventHandler GetRdsCollectionsPagedCompleted;
@ -212,12 +204,27 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/>
public event GetOrganizationRdsUsersCountCompletedEventHandler GetOrganizationRdsUsersCountCompleted;
/// <remarks/>
public event GetOrganizationRdsServersCountCompletedEventHandler GetOrganizationRdsServersCountCompleted;
/// <remarks/>
public event GetOrganizationRdsCollectionsCountCompletedEventHandler GetOrganizationRdsCollectionsCountCompleted;
/// <remarks/>
public event GetApplicationUsersCompletedEventHandler GetApplicationUsersCompleted;
/// <remarks/>
public event SetApplicationUsersCompletedEventHandler SetApplicationUsersCompleted;
/// <remarks/>
public event GetRdsUserSessionsCompletedEventHandler GetRdsUserSessionsCompleted;
/// <remarks/>
public event LogOffRdsUserCompletedEventHandler LogOffRdsUserCompleted;
/// <remarks/>
public event GetRdsCollectionSessionHostsCompletedEventHandler GetRdsCollectionSessionHostsCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public RdsCollection GetRdsCollection(int collectionId) {
@ -259,6 +266,47 @@ namespace WebsitePanel.EnterpriseServer {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollectionSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public RdsCollectionSettings GetRdsCollectionSettings(int collectionId) {
object[] results = this.Invoke("GetRdsCollectionSettings", new object[] {
collectionId});
return ((RdsCollectionSettings)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetRdsCollectionSettings(int collectionId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetRdsCollectionSettings", new object[] {
collectionId}, callback, asyncState);
}
/// <remarks/>
public RdsCollectionSettings EndGetRdsCollectionSettings(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((RdsCollectionSettings)(results[0]));
}
/// <remarks/>
public void GetRdsCollectionSettingsAsync(int collectionId) {
this.GetRdsCollectionSettingsAsync(collectionId, null);
}
/// <remarks/>
public void GetRdsCollectionSettingsAsync(int collectionId, object userState) {
if ((this.GetRdsCollectionSettingsOperationCompleted == null)) {
this.GetRdsCollectionSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsCollectionSettingsOperationCompleted);
}
this.InvokeAsync("GetRdsCollectionSettings", new object[] {
collectionId}, this.GetRdsCollectionSettingsOperationCompleted, userState);
}
private void OnGetRdsCollectionSettingsOperationCompleted(object arg) {
if ((this.GetRdsCollectionSettingsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetRdsCollectionSettingsCompleted(this, new GetRdsCollectionSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOrganizationRdsCollections", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public RdsCollection[] GetOrganizationRdsCollections(int itemId) {
@ -302,11 +350,11 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddRdsCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject AddRdsCollection(int itemId, RdsCollection collection) {
public int AddRdsCollection(int itemId, RdsCollection collection) {
object[] results = this.Invoke("AddRdsCollection", new object[] {
itemId,
collection});
return ((ResultObject)(results[0]));
return ((int)(results[0]));
}
/// <remarks/>
@ -317,9 +365,9 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
public ResultObject EndAddRdsCollection(System.IAsyncResult asyncResult) {
public int EndAddRdsCollection(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
return ((int)(results[0]));
}
/// <remarks/>
@ -388,6 +436,50 @@ namespace WebsitePanel.EnterpriseServer {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/EditRdsCollectionSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject EditRdsCollectionSettings(int itemId, RdsCollection collection) {
object[] results = this.Invoke("EditRdsCollectionSettings", new object[] {
itemId,
collection});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginEditRdsCollectionSettings(int itemId, RdsCollection collection, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("EditRdsCollectionSettings", new object[] {
itemId,
collection}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndEditRdsCollectionSettings(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void EditRdsCollectionSettingsAsync(int itemId, RdsCollection collection) {
this.EditRdsCollectionSettingsAsync(itemId, collection, null);
}
/// <remarks/>
public void EditRdsCollectionSettingsAsync(int itemId, RdsCollection collection, object userState) {
if ((this.EditRdsCollectionSettingsOperationCompleted == null)) {
this.EditRdsCollectionSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEditRdsCollectionSettingsOperationCompleted);
}
this.InvokeAsync("EditRdsCollectionSettings", new object[] {
itemId,
collection}, this.EditRdsCollectionSettingsOperationCompleted, userState);
}
private void OnEditRdsCollectionSettingsOperationCompleted(object arg) {
if ((this.EditRdsCollectionSettingsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.EditRdsCollectionSettingsCompleted(this, new EditRdsCollectionSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollectionsPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public RdsCollectionPaged GetRdsCollectionsPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) {
@ -543,8 +635,9 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetFreeRdsServersPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public RdsServersPaged GetFreeRdsServersPaged(string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) {
public RdsServersPaged GetFreeRdsServersPaged(int packageId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) {
object[] results = this.Invoke("GetFreeRdsServersPaged", new object[] {
packageId,
filterColumn,
filterValue,
sortColumn,
@ -554,8 +647,9 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
public System.IAsyncResult BeginGetFreeRdsServersPaged(string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) {
public System.IAsyncResult BeginGetFreeRdsServersPaged(int packageId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetFreeRdsServersPaged", new object[] {
packageId,
filterColumn,
filterValue,
sortColumn,
@ -570,16 +664,17 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
public void GetFreeRdsServersPagedAsync(string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) {
this.GetFreeRdsServersPagedAsync(filterColumn, filterValue, sortColumn, startRow, maximumRows, null);
public void GetFreeRdsServersPagedAsync(int packageId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) {
this.GetFreeRdsServersPagedAsync(packageId, filterColumn, filterValue, sortColumn, startRow, maximumRows, null);
}
/// <remarks/>
public void GetFreeRdsServersPagedAsync(string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) {
public void GetFreeRdsServersPagedAsync(int packageId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) {
if ((this.GetFreeRdsServersPagedOperationCompleted == null)) {
this.GetFreeRdsServersPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFreeRdsServersPagedOperationCompleted);
}
this.InvokeAsync("GetFreeRdsServersPaged", new object[] {
packageId,
filterColumn,
filterValue,
sortColumn,
@ -1541,6 +1636,88 @@ namespace WebsitePanel.EnterpriseServer {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOrganizationRdsServersCount", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int GetOrganizationRdsServersCount(int itemId) {
object[] results = this.Invoke("GetOrganizationRdsServersCount", new object[] {
itemId});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetOrganizationRdsServersCount(int itemId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetOrganizationRdsServersCount", new object[] {
itemId}, callback, asyncState);
}
/// <remarks/>
public int EndGetOrganizationRdsServersCount(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
/// <remarks/>
public void GetOrganizationRdsServersCountAsync(int itemId) {
this.GetOrganizationRdsServersCountAsync(itemId, null);
}
/// <remarks/>
public void GetOrganizationRdsServersCountAsync(int itemId, object userState) {
if ((this.GetOrganizationRdsServersCountOperationCompleted == null)) {
this.GetOrganizationRdsServersCountOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationRdsServersCountOperationCompleted);
}
this.InvokeAsync("GetOrganizationRdsServersCount", new object[] {
itemId}, this.GetOrganizationRdsServersCountOperationCompleted, userState);
}
private void OnGetOrganizationRdsServersCountOperationCompleted(object arg) {
if ((this.GetOrganizationRdsServersCountCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetOrganizationRdsServersCountCompleted(this, new GetOrganizationRdsServersCountCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOrganizationRdsCollectionsCount", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int GetOrganizationRdsCollectionsCount(int itemId) {
object[] results = this.Invoke("GetOrganizationRdsCollectionsCount", new object[] {
itemId});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetOrganizationRdsCollectionsCount(int itemId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetOrganizationRdsCollectionsCount", new object[] {
itemId}, callback, asyncState);
}
/// <remarks/>
public int EndGetOrganizationRdsCollectionsCount(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
/// <remarks/>
public void GetOrganizationRdsCollectionsCountAsync(int itemId) {
this.GetOrganizationRdsCollectionsCountAsync(itemId, null);
}
/// <remarks/>
public void GetOrganizationRdsCollectionsCountAsync(int itemId, object userState) {
if ((this.GetOrganizationRdsCollectionsCountOperationCompleted == null)) {
this.GetOrganizationRdsCollectionsCountOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationRdsCollectionsCountOperationCompleted);
}
this.InvokeAsync("GetOrganizationRdsCollectionsCount", new object[] {
itemId}, this.GetOrganizationRdsCollectionsCountOperationCompleted, userState);
}
private void OnGetOrganizationRdsCollectionsCountOperationCompleted(object arg) {
if ((this.GetOrganizationRdsCollectionsCountCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetOrganizationRdsCollectionsCountCompleted(this, new GetOrganizationRdsCollectionsCountCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetApplicationUsers", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string[] GetApplicationUsers(int itemId, int collectionId, RemoteApplication remoteApp) {
@ -1638,6 +1815,135 @@ namespace WebsitePanel.EnterpriseServer {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsUserSessions", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public RdsUserSession[] GetRdsUserSessions(int collectionId) {
object[] results = this.Invoke("GetRdsUserSessions", new object[] {
collectionId});
return ((RdsUserSession[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetRdsUserSessions(int collectionId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetRdsUserSessions", new object[] {
collectionId}, callback, asyncState);
}
/// <remarks/>
public RdsUserSession[] EndGetRdsUserSessions(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((RdsUserSession[])(results[0]));
}
/// <remarks/>
public void GetRdsUserSessionsAsync(int collectionId) {
this.GetRdsUserSessionsAsync(collectionId, null);
}
/// <remarks/>
public void GetRdsUserSessionsAsync(int collectionId, object userState) {
if ((this.GetRdsUserSessionsOperationCompleted == null)) {
this.GetRdsUserSessionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsUserSessionsOperationCompleted);
}
this.InvokeAsync("GetRdsUserSessions", new object[] {
collectionId}, this.GetRdsUserSessionsOperationCompleted, userState);
}
private void OnGetRdsUserSessionsOperationCompleted(object arg) {
if ((this.GetRdsUserSessionsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetRdsUserSessionsCompleted(this, new GetRdsUserSessionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/LogOffRdsUser", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject LogOffRdsUser(int itemId, string unifiedSessionId, string hostServer) {
object[] results = this.Invoke("LogOffRdsUser", new object[] {
itemId,
unifiedSessionId,
hostServer});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginLogOffRdsUser(int itemId, string unifiedSessionId, string hostServer, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("LogOffRdsUser", new object[] {
itemId,
unifiedSessionId,
hostServer}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndLogOffRdsUser(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void LogOffRdsUserAsync(int itemId, string unifiedSessionId, string hostServer) {
this.LogOffRdsUserAsync(itemId, unifiedSessionId, hostServer, null);
}
/// <remarks/>
public void LogOffRdsUserAsync(int itemId, string unifiedSessionId, string hostServer, object userState) {
if ((this.LogOffRdsUserOperationCompleted == null)) {
this.LogOffRdsUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnLogOffRdsUserOperationCompleted);
}
this.InvokeAsync("LogOffRdsUser", new object[] {
itemId,
unifiedSessionId,
hostServer}, this.LogOffRdsUserOperationCompleted, userState);
}
private void OnLogOffRdsUserOperationCompleted(object arg) {
if ((this.LogOffRdsUserCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.LogOffRdsUserCompleted(this, new LogOffRdsUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollectionSessionHosts", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string[] GetRdsCollectionSessionHosts(int collectionId) {
object[] results = this.Invoke("GetRdsCollectionSessionHosts", new object[] {
collectionId});
return ((string[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetRdsCollectionSessionHosts(int collectionId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetRdsCollectionSessionHosts", new object[] {
collectionId}, callback, asyncState);
}
/// <remarks/>
public string[] EndGetRdsCollectionSessionHosts(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string[])(results[0]));
}
/// <remarks/>
public void GetRdsCollectionSessionHostsAsync(int collectionId) {
this.GetRdsCollectionSessionHostsAsync(collectionId, null);
}
/// <remarks/>
public void GetRdsCollectionSessionHostsAsync(int collectionId, object userState) {
if ((this.GetRdsCollectionSessionHostsOperationCompleted == null)) {
this.GetRdsCollectionSessionHostsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsCollectionSessionHostsOperationCompleted);
}
this.InvokeAsync("GetRdsCollectionSessionHosts", new object[] {
collectionId}, this.GetRdsCollectionSessionHostsOperationCompleted, userState);
}
private void OnGetRdsCollectionSessionHostsOperationCompleted(object arg) {
if ((this.GetRdsCollectionSessionHostsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetRdsCollectionSessionHostsCompleted(this, new GetRdsCollectionSessionHostsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
@ -1670,6 +1976,32 @@ namespace WebsitePanel.EnterpriseServer {
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetRdsCollectionSettingsCompletedEventHandler(object sender, GetRdsCollectionSettingsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetRdsCollectionSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetRdsCollectionSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public RdsCollectionSettings Result {
get {
this.RaiseExceptionIfNecessary();
return ((RdsCollectionSettings)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetOrganizationRdsCollectionsCompletedEventHandler(object sender, GetOrganizationRdsCollectionsCompletedEventArgs e);
@ -1714,10 +2046,10 @@ namespace WebsitePanel.EnterpriseServer {
}
/// <remarks/>
public ResultObject Result {
public int Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
return ((int)(this.results[0]));
}
}
}
@ -1748,6 +2080,32 @@ namespace WebsitePanel.EnterpriseServer {
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void EditRdsCollectionSettingsCompletedEventHandler(object sender, EditRdsCollectionSettingsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class EditRdsCollectionSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal EditRdsCollectionSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetRdsCollectionsPagedCompletedEventHandler(object sender, GetRdsCollectionsPagedCompletedEventArgs e);
@ -2398,6 +2756,58 @@ namespace WebsitePanel.EnterpriseServer {
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetOrganizationRdsServersCountCompletedEventHandler(object sender, GetOrganizationRdsServersCountCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetOrganizationRdsServersCountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetOrganizationRdsServersCountCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int Result {
get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetOrganizationRdsCollectionsCountCompletedEventHandler(object sender, GetOrganizationRdsCollectionsCountCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetOrganizationRdsCollectionsCountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetOrganizationRdsCollectionsCountCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int Result {
get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetApplicationUsersCompletedEventHandler(object sender, GetApplicationUsersCompletedEventArgs e);
@ -2449,4 +2859,82 @@ namespace WebsitePanel.EnterpriseServer {
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetRdsUserSessionsCompletedEventHandler(object sender, GetRdsUserSessionsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetRdsUserSessionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetRdsUserSessionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public RdsUserSession[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((RdsUserSession[])(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void LogOffRdsUserCompletedEventHandler(object sender, LogOffRdsUserCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class LogOffRdsUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal LogOffRdsUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetRdsCollectionSessionHostsCompletedEventHandler(object sender, GetRdsCollectionSessionHostsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetRdsCollectionSessionHostsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetRdsCollectionSessionHostsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public string[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((string[])(this.results[0]));
}
}
}
}

View file

@ -1580,7 +1580,7 @@ namespace WebsitePanel.EnterpriseServer
public static DataSet UpdatePackage(int actorId, int packageId, int planId, string packageName,
string packageComments, int statusId, DateTime purchaseDate,
bool overrideQuotas, string quotasXml)
bool overrideQuotas, string quotasXml, bool defaultTopPackage)
{
return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure,
ObjectQualifier + "UpdatePackage",
@ -1592,7 +1592,8 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@planId", planId),
new SqlParameter("@purchaseDate", purchaseDate),
new SqlParameter("@overrideQuotas", overrideQuotas),
new SqlParameter("@quotasXml", quotasXml));
new SqlParameter("@quotasXml", quotasXml),
new SqlParameter("@defaultTopPackage", defaultTopPackage));
}
public static void UpdatePackageName(int actorId, int packageId, string packageName,
@ -2072,7 +2073,8 @@ namespace WebsitePanel.EnterpriseServer
return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure,
ObjectQualifier + "GetSchedules",
new SqlParameter("@actorId", actorId),
new SqlParameter("@packageId", packageId));
new SqlParameter("@packageId", packageId),
new SqlParameter("@recursive", true));
}
public static DataSet GetSchedulesPaged(int actorId, int packageId, bool recursive,
@ -2366,7 +2368,6 @@ namespace WebsitePanel.EnterpriseServer
#region Exchange Server
public static int AddExchangeAccount(int itemId, int accountType, string accountName,
string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder,
string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, string subscriberNumber)
@ -2395,7 +2396,6 @@ namespace WebsitePanel.EnterpriseServer
return Convert.ToInt32(outParam.Value);
}
public static void AddExchangeAccountEmailAddress(int accountId, string emailAddress)
{
SqlHelper.ExecuteNonQuery(
@ -2813,7 +2813,7 @@ namespace WebsitePanel.EnterpriseServer
bool isDefault, int issueWarningPct, int keepDeletedItemsDays, int mailboxSizeMB, int maxReceiveMessageSizeKB, int maxRecipients,
int maxSendMessageSizeKB, int prohibitSendPct, int prohibitSendReceivePct, bool hideFromAddressBook, int mailboxPlanType,
bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg,
bool archiving, bool EnableArchiving, int ArchiveSizeMB, int ArchiveWarningPct)
bool archiving, bool EnableArchiving, int ArchiveSizeMB, int ArchiveWarningPct, bool enableForceArchiveDeletion)
{
SqlParameter outParam = new SqlParameter("@MailboxPlanId", SqlDbType.Int);
outParam.Direction = ParameterDirection.Output;
@ -2849,7 +2849,8 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@Archiving", archiving),
new SqlParameter("@EnableArchiving", EnableArchiving),
new SqlParameter("@ArchiveSizeMB", ArchiveSizeMB),
new SqlParameter("@ArchiveWarningPct", ArchiveWarningPct)
new SqlParameter("@ArchiveWarningPct", ArchiveWarningPct),
new SqlParameter("@EnableForceArchiveDeletion", enableForceArchiveDeletion)
);
return Convert.ToInt32(outParam.Value);
@ -2861,7 +2862,7 @@ namespace WebsitePanel.EnterpriseServer
bool isDefault, int issueWarningPct, int keepDeletedItemsDays, int mailboxSizeMB, int maxReceiveMessageSizeKB, int maxRecipients,
int maxSendMessageSizeKB, int prohibitSendPct, int prohibitSendReceivePct, bool hideFromAddressBook, int mailboxPlanType,
bool enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg,
bool Archiving, bool EnableArchiving, int ArchiveSizeMB, int ArchiveWarningPct)
bool Archiving, bool EnableArchiving, int ArchiveSizeMB, int ArchiveWarningPct, bool enableForceArchiveDeletion)
{
SqlHelper.ExecuteNonQuery(
ConnectionString,
@ -2893,7 +2894,8 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@Archiving", Archiving),
new SqlParameter("@EnableArchiving", EnableArchiving),
new SqlParameter("@ArchiveSizeMB", ArchiveSizeMB),
new SqlParameter("@ArchiveWarningPct", ArchiveWarningPct)
new SqlParameter("@ArchiveWarningPct", ArchiveWarningPct),
new SqlParameter("@EnableForceArchiveDeletion", enableForceArchiveDeletion)
);
}
@ -3169,6 +3171,45 @@ namespace WebsitePanel.EnterpriseServer
#region Organizations
public static int AddOrganizationDeletedUser(int accountId, int originAT, string storagePath, string folderName, string fileName, DateTime expirationDate)
{
SqlParameter outParam = new SqlParameter("@ID", SqlDbType.Int);
outParam.Direction = ParameterDirection.Output;
SqlHelper.ExecuteNonQuery(
ConnectionString,
CommandType.StoredProcedure,
"AddOrganizationDeletedUser",
outParam,
new SqlParameter("@AccountID", accountId),
new SqlParameter("@OriginAT", originAT),
new SqlParameter("@StoragePath", storagePath),
new SqlParameter("@FolderName", folderName),
new SqlParameter("@FileName", fileName),
new SqlParameter("@ExpirationDate", expirationDate)
);
return Convert.ToInt32(outParam.Value);
}
public static void DeleteOrganizationDeletedUser(int id)
{
SqlHelper.ExecuteNonQuery(ConnectionString,
CommandType.StoredProcedure,
"DeleteOrganizationDeletedUser",
new SqlParameter("@ID", id));
}
public static IDataReader GetOrganizationDeletedUser(int accountId)
{
return SqlHelper.ExecuteReader(
ConnectionString,
CommandType.StoredProcedure,
"GetOrganizationDeletedUser",
new SqlParameter("@AccountID", accountId)
);
}
public static IDataReader GetAdditionalGroups(int userId)
{
return SqlHelper.ExecuteReader(
@ -4329,6 +4370,57 @@ namespace WebsitePanel.EnterpriseServer
#region Enterprise Storage
public static int AddWebDavAccessToken(Base.HostedSolution.WebDavAccessToken accessToken)
{
SqlParameter prmId = new SqlParameter("@TokenID", SqlDbType.Int);
prmId.Direction = ParameterDirection.Output;
SqlHelper.ExecuteNonQuery(
ConnectionString,
CommandType.StoredProcedure,
"AddWebDavAccessToken",
prmId,
new SqlParameter("@AccessToken", accessToken.AccessToken),
new SqlParameter("@FilePath", accessToken.FilePath),
new SqlParameter("@AuthData", accessToken.AuthData),
new SqlParameter("@ExpirationDate", accessToken.ExpirationDate),
new SqlParameter("@AccountID", accessToken.AccountId),
new SqlParameter("@ItemId", accessToken.ItemId)
);
// read identity
return Convert.ToInt32(prmId.Value);
}
public static void DeleteExpiredWebDavAccessTokens()
{
SqlHelper.ExecuteNonQuery(
ConnectionString,
CommandType.StoredProcedure,
"DeleteExpiredWebDavAccessTokens"
);
}
public static IDataReader GetWebDavAccessTokenById(int id)
{
return SqlHelper.ExecuteReader(
ConnectionString,
CommandType.StoredProcedure,
"GetWebDavAccessTokenById",
new SqlParameter("@Id", id)
);
}
public static IDataReader GetWebDavAccessTokenByAccessToken(Guid accessToken)
{
return SqlHelper.ExecuteReader(
ConnectionString,
CommandType.StoredProcedure,
"GetWebDavAccessTokenByAccessToken",
new SqlParameter("@AccessToken", accessToken)
);
}
public static int AddEntepriseFolder(int itemId, string folderName, int folderQuota, string locationDrive, string homeFolder, string domain)
{
SqlParameter prmId = new SqlParameter("@FolderID", SqlDbType.Int);
@ -4464,6 +4556,95 @@ namespace WebsitePanel.EnterpriseServer
#region RDS
public static IDataReader GetRdsCollectionSettingsByCollectionId(int collectionId)
{
return SqlHelper.ExecuteReader(
ConnectionString,
CommandType.StoredProcedure,
"GetRDSCollectionSettingsByCollectionId",
new SqlParameter("@RDSCollectionID", collectionId)
);
}
public static int AddRdsCollectionSettings(RdsCollectionSettings settings)
{
return AddRdsCollectionSettings(settings.RdsCollectionId, settings.DisconnectedSessionLimitMin, settings.ActiveSessionLimitMin, settings.IdleSessionLimitMin, settings.BrokenConnectionAction,
settings.AutomaticReconnectionEnabled, settings.TemporaryFoldersDeletedOnExit, settings.TemporaryFoldersPerSession, settings.ClientDeviceRedirectionOptions, settings.ClientPrinterRedirected,
settings.ClientPrinterAsDefault, settings.RDEasyPrintDriverEnabled, settings.MaxRedirectedMonitors);
}
private static int AddRdsCollectionSettings(int rdsCollectionId, int disconnectedSessionLimitMin, int activeSessionLimitMin, int idleSessionLimitMin, string brokenConnectionAction,
bool automaticReconnectionEnabled, bool temporaryFoldersDeletedOnExit, bool temporaryFoldersPerSession, string clientDeviceRedirectionOptions, bool ClientPrinterRedirected,
bool clientPrinterAsDefault, bool rdEasyPrintDriverEnabled, int maxRedirectedMonitors)
{
SqlParameter rdsCollectionSettingsId = new SqlParameter("@RDSCollectionSettingsID", SqlDbType.Int);
rdsCollectionSettingsId.Direction = ParameterDirection.Output;
SqlHelper.ExecuteNonQuery(
ConnectionString,
CommandType.StoredProcedure,
"AddRDSCollectionSettings",
rdsCollectionSettingsId,
new SqlParameter("@RdsCollectionId", rdsCollectionId),
new SqlParameter("@DisconnectedSessionLimitMin", disconnectedSessionLimitMin),
new SqlParameter("@ActiveSessionLimitMin", activeSessionLimitMin),
new SqlParameter("@IdleSessionLimitMin", idleSessionLimitMin),
new SqlParameter("@BrokenConnectionAction", brokenConnectionAction),
new SqlParameter("@AutomaticReconnectionEnabled", automaticReconnectionEnabled),
new SqlParameter("@TemporaryFoldersDeletedOnExit", temporaryFoldersDeletedOnExit),
new SqlParameter("@TemporaryFoldersPerSession", temporaryFoldersPerSession),
new SqlParameter("@ClientDeviceRedirectionOptions", clientDeviceRedirectionOptions),
new SqlParameter("@ClientPrinterRedirected", ClientPrinterRedirected),
new SqlParameter("@ClientPrinterAsDefault", clientPrinterAsDefault),
new SqlParameter("@RDEasyPrintDriverEnabled", rdEasyPrintDriverEnabled),
new SqlParameter("@MaxRedirectedMonitors", maxRedirectedMonitors)
);
return Convert.ToInt32(rdsCollectionSettingsId.Value);
}
public static void UpdateRDSCollectionSettings(RdsCollectionSettings settings)
{
UpdateRDSCollectionSettings(settings.Id, settings.RdsCollectionId, settings.DisconnectedSessionLimitMin, settings.ActiveSessionLimitMin, settings.IdleSessionLimitMin, settings.BrokenConnectionAction,
settings.AutomaticReconnectionEnabled, settings.TemporaryFoldersDeletedOnExit, settings.TemporaryFoldersPerSession, settings.ClientDeviceRedirectionOptions, settings.ClientPrinterRedirected,
settings.ClientPrinterAsDefault, settings.RDEasyPrintDriverEnabled, settings.MaxRedirectedMonitors);
}
public static void UpdateRDSCollectionSettings(int id, int rdsCollectionId, int disconnectedSessionLimitMin, int activeSessionLimitMin, int idleSessionLimitMin, string brokenConnectionAction,
bool automaticReconnectionEnabled, bool temporaryFoldersDeletedOnExit, bool temporaryFoldersPerSession, string clientDeviceRedirectionOptions, bool ClientPrinterRedirected,
bool clientPrinterAsDefault, bool rdEasyPrintDriverEnabled, int maxRedirectedMonitors)
{
SqlHelper.ExecuteNonQuery(
ConnectionString,
CommandType.StoredProcedure,
"UpdateRDSCollectionSettings",
new SqlParameter("@Id", id),
new SqlParameter("@RdsCollectionId", rdsCollectionId),
new SqlParameter("@DisconnectedSessionLimitMin", disconnectedSessionLimitMin),
new SqlParameter("@ActiveSessionLimitMin", activeSessionLimitMin),
new SqlParameter("@IdleSessionLimitMin", idleSessionLimitMin),
new SqlParameter("@BrokenConnectionAction", brokenConnectionAction),
new SqlParameter("@AutomaticReconnectionEnabled", automaticReconnectionEnabled),
new SqlParameter("@TemporaryFoldersDeletedOnExit", temporaryFoldersDeletedOnExit),
new SqlParameter("@TemporaryFoldersPerSession", temporaryFoldersPerSession),
new SqlParameter("@ClientDeviceRedirectionOptions", clientDeviceRedirectionOptions),
new SqlParameter("@ClientPrinterRedirected", ClientPrinterRedirected),
new SqlParameter("@ClientPrinterAsDefault", clientPrinterAsDefault),
new SqlParameter("@RDEasyPrintDriverEnabled", rdEasyPrintDriverEnabled),
new SqlParameter("@MaxRedirectedMonitors", maxRedirectedMonitors)
);
}
public static void DeleteRDSCollectionSettings(int id)
{
SqlHelper.ExecuteNonQuery(
ConnectionString,
CommandType.StoredProcedure,
"DeleteRDSCollectionSettings",
new SqlParameter("@Id", id)
);
}
public static IDataReader GetRDSCollectionsByItemId(int itemId)
{
return SqlHelper.ExecuteReader(
@ -4509,7 +4690,7 @@ namespace WebsitePanel.EnterpriseServer
);
}
public static int AddRDSCollection(int itemId, string name, string description)
public static int AddRDSCollection(int itemId, string name, string description, string displayName)
{
SqlParameter rdsCollectionId = new SqlParameter("@RDSCollectionID", SqlDbType.Int);
rdsCollectionId.Direction = ParameterDirection.Output;
@ -4521,7 +4702,8 @@ namespace WebsitePanel.EnterpriseServer
rdsCollectionId,
new SqlParameter("@ItemID", itemId),
new SqlParameter("@Name", name),
new SqlParameter("@Description", description)
new SqlParameter("@Description", description),
new SqlParameter("@DisplayName", displayName)
);
// read identity
@ -4542,12 +4724,40 @@ namespace WebsitePanel.EnterpriseServer
return Convert.ToInt32(count.Value);
}
public static void UpdateRDSCollection(RdsCollection collection)
public static int GetOrganizationRdsCollectionsCount(int itemId)
{
UpdateRDSCollection(collection.Id, collection.ItemId, collection.Name, collection.Description);
SqlParameter count = new SqlParameter("@TotalNumber", SqlDbType.Int);
count.Direction = ParameterDirection.Output;
DataSet ds = SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure,
ObjectQualifier + "GetOrganizationRdsCollectionsCount",
count,
new SqlParameter("@ItemId", itemId));
// read identity
return Convert.ToInt32(count.Value);
}
public static void UpdateRDSCollection(int id, int itemId, string name, string description)
public static int GetOrganizationRdsServersCount(int itemId)
{
SqlParameter count = new SqlParameter("@TotalNumber", SqlDbType.Int);
count.Direction = ParameterDirection.Output;
DataSet ds = SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure,
ObjectQualifier + "GetOrganizationRdsServersCount",
count,
new SqlParameter("@ItemId", itemId));
// read identity
return Convert.ToInt32(count.Value);
}
public static void UpdateRDSCollection(RdsCollection collection)
{
UpdateRDSCollection(collection.Id, collection.ItemId, collection.Name, collection.Description, collection.DisplayName);
}
public static void UpdateRDSCollection(int id, int itemId, string name, string description, string displayName)
{
SqlHelper.ExecuteNonQuery(
ConnectionString,
@ -4556,7 +4766,8 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@Id", id),
new SqlParameter("@ItemID", itemId),
new SqlParameter("@Name", name),
new SqlParameter("@Description", description)
new SqlParameter("@Description", description),
new SqlParameter("@DisplayName", displayName)
);
}

View file

@ -272,6 +272,14 @@ namespace WebsitePanel.EnterpriseServer
// delete service item
PackageController.DeletePackageItem(zoneItemId);
// Delete also all seconday service items
var zoneItems = PackageController.GetPackageItemsByType(zoneItem.PackageId, ResourceGroups.Dns, typeof (SecondaryDnsZone));
foreach (var item in zoneItems.Where(z => z.Name == zoneItem.Name))
{
PackageController.DeletePackageItem(item.Id);
}
}
catch (Exception ex)
{

View file

@ -152,6 +152,26 @@ namespace WebsitePanel.EnterpriseServer
StartESBackgroundTaskInternal("SET_ENTERPRISE_FOLDER_SETTINGS", itemId, folder, permissions, directoyBrowsingEnabled, quota, quotaType);
}
public static int AddWebDavAccessToken(WebDavAccessToken accessToken)
{
return DataProvider.AddWebDavAccessToken(accessToken);
}
public static void DeleteExpiredWebDavAccessTokens()
{
DataProvider.DeleteExpiredWebDavAccessTokens();
}
public static WebDavAccessToken GetWebDavAccessTokenById(int id)
{
return ObjectUtils.FillObjectFromDataReader<WebDavAccessToken>(DataProvider.GetWebDavAccessTokenById(id));
}
public static WebDavAccessToken GetWebDavAccessTokenByAccessToken(Guid accessToken)
{
return ObjectUtils.FillObjectFromDataReader<WebDavAccessToken>(DataProvider.GetWebDavAccessTokenByAccessToken(accessToken));
}
#region Directory Browsing
public static bool GetDirectoryBrowseEnabled(int itemId, string siteId)

View file

@ -31,6 +31,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Data;
using System.Linq;
using System.Net.Mail;
using System.Threading;
using WebsitePanel.EnterpriseServer.Code.HostedSolution;
@ -1967,6 +1968,86 @@ namespace WebsitePanel.EnterpriseServer
}
}
public static int ExportMailBox(int itemId, int accountId, string path)
{
// check account
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
if (accountCheck < 0)
{
return accountCheck;
}
// place log record
TaskManager.StartTask("EXCHANGE", "EXPORT_MAILBOX", itemId);
try
{
// load organization
Organization org = GetOrganization(itemId);
if (org == null)
return -1;
// load account
ExchangeAccount account = GetAccount(itemId, accountId);
// export mailbox
int serviceExchangeId = GetExchangeServiceID(org.PackageId);
ExchangeServer exchange = GetExchangeServer(serviceExchangeId, org.ServiceId);
exchange.ExportMailBox(org.OrganizationId, account.UserPrincipalName, path);
return 0;
}
catch (Exception ex)
{
throw TaskManager.WriteError(ex);
}
finally
{
TaskManager.CompleteTask();
}
}
public static int SetDeletedMailbox(int itemId, int accountId)
{
// check account
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
if (accountCheck < 0) return accountCheck;
// place log record
TaskManager.StartTask("EXCHANGE", "SET_DELETED_MAILBOX", itemId);
try
{
// load organization
Organization org = GetOrganization(itemId);
if (org == null)
return -1;
// load account
ExchangeAccount account = GetAccount(itemId, accountId);
if (BlackBerryController.CheckBlackBerryUserExists(accountId))
{
BlackBerryController.DeleteBlackBerryUser(itemId, accountId);
}
// delete mailbox
int serviceExchangeId = GetExchangeServiceID(org.PackageId);
ExchangeServer exchange = GetExchangeServer(serviceExchangeId, org.ServiceId);
exchange.DisableMailbox(account.UserPrincipalName);
return 0;
}
catch (Exception ex)
{
throw TaskManager.WriteError(ex);
}
finally
{
TaskManager.CompleteTask();
}
}
public static int DeleteMailbox(int itemId, int accountId)
{
@ -2839,23 +2920,18 @@ namespace WebsitePanel.EnterpriseServer
try
{
List<ExchangeMailboxPlan> mailboxPlans = new List<ExchangeMailboxPlan>();
int? defaultPlanId = null;
UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(DataProvider.GetUserByExchangeOrganizationIdInternally(itemId));
if (user.Role == UserRole.User)
ExchangeServerController.GetExchangeMailboxPlansByUser(itemId, user, ref mailboxPlans, archiving);
GetExchangeMailboxPlansByUser(itemId, user, ref mailboxPlans, ref defaultPlanId, archiving);
else
ExchangeServerController.GetExchangeMailboxPlansByUser(0, user, ref mailboxPlans, archiving);
GetExchangeMailboxPlansByUser(0, user, ref mailboxPlans, ref defaultPlanId, archiving);
ExchangeOrganization ExchangeOrg = ObjectUtils.FillObjectFromDataReader<ExchangeOrganization>(DataProvider.GetExchangeOrganization(itemId));
if (ExchangeOrg != null)
if (defaultPlanId.HasValue)
{
foreach (ExchangeMailboxPlan p in mailboxPlans)
{
p.IsDefault = (p.MailboxPlanId == ExchangeOrg.ExchangeMailboxPlanID);
}
mailboxPlans.ForEach(p => p.IsDefault = (p.MailboxPlanId == defaultPlanId.Value));
}
return mailboxPlans;
@ -2870,7 +2946,7 @@ namespace WebsitePanel.EnterpriseServer
}
}
private static void GetExchangeMailboxPlansByUser(int itemId, UserInfo user, ref List<ExchangeMailboxPlan> mailboxPlans, bool archiving)
private static void GetExchangeMailboxPlansByUser(int itemId, UserInfo user, ref List<ExchangeMailboxPlan> mailboxPlans, ref int? defaultPlanId, bool archiving)
{
if ((user != null))
{
@ -2903,11 +2979,20 @@ namespace WebsitePanel.EnterpriseServer
{
mailboxPlans.Add(p);
}
// Set default plan
ExchangeOrganization exchangeOrg = ObjectUtils.FillObjectFromDataReader<ExchangeOrganization>(DataProvider.GetExchangeOrganization(OrgId));
// If the default plan has not been set by the setting of higher priority
if (!defaultPlanId.HasValue && exchangeOrg != null && exchangeOrg.ExchangeMailboxPlanID > 0)
{
defaultPlanId = exchangeOrg.ExchangeMailboxPlanID;
}
}
UserInfo owner = UserController.GetUserInternally(user.OwnerId);
GetExchangeMailboxPlansByUser(0, owner, ref mailboxPlans, archiving);
GetExchangeMailboxPlansByUser(0, owner, ref mailboxPlans, ref defaultPlanId, archiving);
}
}
@ -2998,7 +3083,7 @@ namespace WebsitePanel.EnterpriseServer
mailboxPlan.MaxSendMessageSizeKB, mailboxPlan.ProhibitSendPct, mailboxPlan.ProhibitSendReceivePct, mailboxPlan.HideFromAddressBook, mailboxPlan.MailboxPlanType,
mailboxPlan.AllowLitigationHold, mailboxPlan.RecoverableItemsSpace, mailboxPlan.RecoverableItemsWarningPct,
mailboxPlan.LitigationHoldUrl, mailboxPlan.LitigationHoldMsg, mailboxPlan.Archiving, mailboxPlan.EnableArchiving,
mailboxPlan.ArchiveSizeMB, mailboxPlan.ArchiveWarningPct);
mailboxPlan.ArchiveSizeMB, mailboxPlan.ArchiveWarningPct, mailboxPlan.EnableForceArchiveDeletion);
}
catch (Exception ex)
{
@ -3068,9 +3153,8 @@ namespace WebsitePanel.EnterpriseServer
mailboxPlan.IsDefault, mailboxPlan.IssueWarningPct, mailboxPlan.KeepDeletedItemsDays, mailboxPlan.MailboxSizeMB, mailboxPlan.MaxReceiveMessageSizeKB, mailboxPlan.MaxRecipients,
mailboxPlan.MaxSendMessageSizeKB, mailboxPlan.ProhibitSendPct, mailboxPlan.ProhibitSendReceivePct, mailboxPlan.HideFromAddressBook, mailboxPlan.MailboxPlanType,
mailboxPlan.AllowLitigationHold, mailboxPlan.RecoverableItemsSpace, mailboxPlan.RecoverableItemsWarningPct,
mailboxPlan.LitigationHoldUrl, mailboxPlan.LitigationHoldMsg,
mailboxPlan.Archiving, mailboxPlan.EnableArchiving,
mailboxPlan.ArchiveSizeMB, mailboxPlan.ArchiveWarningPct);
mailboxPlan.LitigationHoldUrl, mailboxPlan.LitigationHoldMsg, mailboxPlan.Archiving, mailboxPlan.EnableArchiving,
mailboxPlan.ArchiveSizeMB, mailboxPlan.ArchiveWarningPct, mailboxPlan.EnableForceArchiveDeletion);
}
catch (Exception ex)
{

View file

@ -49,6 +49,8 @@ using System.Xml;
using System.Xml.Serialization;
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
using WebsitePanel.Providers.OS;
using System.Text.RegularExpressions;
using WebsitePanel.Server.Client;
namespace WebsitePanel.EnterpriseServer
{
@ -71,6 +73,21 @@ namespace WebsitePanel.EnterpriseServer
return true;
}
private static bool CheckDeletedUserQuota(int orgId, out int errorCode)
{
errorCode = 0;
OrganizationStatistics stats = GetOrganizationStatistics(orgId);
if (stats.AllocatedDeletedUsers != -1 && (stats.DeletedUsers >= stats.AllocatedDeletedUsers))
{
errorCode = BusinessErrorCodes.ERROR_DELETED_USERS_RESOURCE_QUOTA_LIMIT;
return false;
}
return true;
}
private static string EvaluateMailboxTemplate(int itemId, int accountId,
bool pmm, bool emailMode, bool signup, string template)
{
@ -942,6 +959,7 @@ namespace WebsitePanel.EnterpriseServer
stats.CreatedUsers = tempStats.CreatedUsers;
stats.CreatedDomains = tempStats.CreatedDomains;
stats.CreatedGroups = tempStats.CreatedGroups;
stats.DeletedUsers = tempStats.DeletedUsers;
PackageContext cntxTmp = PackageController.GetPackageContext(org.PackageId);
@ -992,6 +1010,13 @@ namespace WebsitePanel.EnterpriseServer
stats.UsedEnterpriseStorageSpace = folders.Where(x => x.FRSMQuotaMB != -1).Sum(x => x.FRSMQuotaMB);
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.RDS))
{
stats.CreatedRdsUsers = RemoteDesktopServicesController.GetOrganizationRdsUsersCount(org.Id);
stats.CreatedRdsCollections = RemoteDesktopServicesController.GetOrganizationRdsCollectionsCount(org.Id);
stats.CreatedRdsServers = RemoteDesktopServicesController.GetOrganizationRdsServersCount(org.Id);
}
}
else
{
@ -1066,6 +1091,13 @@ namespace WebsitePanel.EnterpriseServer
stats.UsedEnterpriseStorageSpace += folders.Where(x => x.FRSMQuotaMB != -1).Sum(x => x.FRSMQuotaMB);
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.RDS))
{
stats.CreatedRdsUsers += RemoteDesktopServicesController.GetOrganizationRdsUsersCount(o.Id);
stats.CreatedRdsCollections += RemoteDesktopServicesController.GetOrganizationRdsCollectionsCount(o.Id);
stats.CreatedRdsServers += RemoteDesktopServicesController.GetOrganizationRdsServersCount(o.Id);
}
}
}
}
@ -1076,6 +1108,7 @@ namespace WebsitePanel.EnterpriseServer
// allocated quotas
PackageContext cntx = PackageController.GetPackageContext(org.PackageId);
stats.AllocatedUsers = cntx.Quotas[Quotas.ORGANIZATION_USERS].QuotaAllocatedValue;
stats.AllocatedDeletedUsers = cntx.Quotas[Quotas.ORGANIZATION_DELETED_USERS].QuotaAllocatedValue;
stats.AllocatedDomains = cntx.Quotas[Quotas.ORGANIZATION_DOMAINS].QuotaAllocatedValue;
stats.AllocatedGroups = cntx.Quotas[Quotas.ORGANIZATION_SECURITYGROUPS].QuotaAllocatedValue;
@ -1119,6 +1152,13 @@ namespace WebsitePanel.EnterpriseServer
stats.AllocatedEnterpriseStorageSpace = cntx.Quotas[Quotas.ENTERPRISESTORAGE_DISKSTORAGESPACE].QuotaAllocatedValue;
}
if (cntx.Groups.ContainsKey(ResourceGroups.RDS))
{
stats.AllocatedRdsServers = cntx.Quotas[Quotas.RDS_SERVERS].QuotaAllocatedValue;
stats.AllocatedRdsCollections = cntx.Quotas[Quotas.RDS_COLLECTIONS].QuotaAllocatedValue;
stats.AllocatedRdsUsers = cntx.Quotas[Quotas.RDS_USERS].QuotaAllocatedValue;
}
return stats;
}
catch (Exception ex)
@ -1336,8 +1376,64 @@ namespace WebsitePanel.EnterpriseServer
#region Users
public static List<OrganizationDeletedUser> GetOrganizationDeletedUsers(int itemId)
{
var result = new List<OrganizationDeletedUser>();
var orgDeletedUsers = ObjectUtils.CreateListFromDataReader<OrganizationUser>(
DataProvider.GetExchangeAccounts(itemId, (int)ExchangeAccountType.DeletedUser));
foreach (var orgDeletedUser in orgDeletedUsers)
{
OrganizationDeletedUser deletedUser = GetDeletedUser(orgDeletedUser.AccountId);
if (deletedUser == null)
continue;
deletedUser.User = orgDeletedUser;
result.Add(deletedUser);
}
return result;
}
public static OrganizationDeletedUsersPaged GetOrganizationDeletedUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn,
int startRow, int maximumRows)
{
DataSet ds =
DataProvider.GetExchangeAccountsPaged(SecurityContext.User.UserId, itemId, ((int)ExchangeAccountType.DeletedUser).ToString(),
filterColumn, filterValue, sortColumn, startRow, maximumRows, false);
OrganizationDeletedUsersPaged result = new OrganizationDeletedUsersPaged();
result.RecordsCount = (int)ds.Tables[0].Rows[0][0];
List<OrganizationUser> Tmpaccounts = new List<OrganizationUser>();
ObjectUtils.FillCollectionFromDataView(Tmpaccounts, ds.Tables[1].DefaultView);
List<OrganizationDeletedUser> deletedUsers = new List<OrganizationDeletedUser>();
foreach (OrganizationUser user in Tmpaccounts.ToArray())
{
OrganizationDeletedUser deletedUser = GetDeletedUser(user.AccountId);
if (deletedUser == null)
continue;
OrganizationUser tmpUser = GetUserGeneralSettings(itemId, user.AccountId);
if (tmpUser != null)
{
deletedUser.User = tmpUser;
deletedUsers.Add(deletedUser);
}
}
result.PageDeletedUsers = deletedUsers.ToArray();
return result;
}
public static OrganizationUsersPaged GetOrganizationUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn,
int startRow, int maximumRows)
@ -1731,10 +1827,256 @@ namespace WebsitePanel.EnterpriseServer
}
else
return true;
}
#region Deleted Users
public static int SetDeletedUser(int itemId, int accountId, bool enableForceArchive)
{
// check account
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
if (accountCheck < 0) return accountCheck;
// place log record
TaskManager.StartTask("ORGANIZATION", "SET_DELETED_USER", itemId);
try
{
Guid crmUserId = CRMController.GetCrmUserId(accountId);
if (crmUserId != Guid.Empty)
{
return BusinessErrorCodes.CURRENT_USER_IS_CRM_USER;
}
if (DataProvider.CheckOCSUserExists(accountId))
{
return BusinessErrorCodes.CURRENT_USER_IS_OCS_USER;
}
if (DataProvider.CheckLyncUserExists(accountId))
{
return BusinessErrorCodes.CURRENT_USER_IS_LYNC_USER;
}
// load organization
Organization org = GetOrganization(itemId);
if (org == null)
return -1;
int errorCode;
if (!CheckDeletedUserQuota(org.Id, out errorCode))
return errorCode;
// load account
ExchangeAccount account = ExchangeServerController.GetAccount(itemId, accountId);
string accountName = GetAccountName(account.AccountName);
var deletedUser = new OrganizationDeletedUser
{
AccountId = account.AccountId,
OriginAT = account.AccountType,
ExpirationDate = DateTime.UtcNow.AddHours(1)
};
if (account.AccountType == ExchangeAccountType.User)
{
Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
//Disable user in AD
orgProxy.DisableUser(accountName, org.OrganizationId);
}
else
{
if (enableForceArchive)
{
var serviceId = PackageController.GetPackageServiceId(org.PackageId, ResourceGroups.HostedOrganizations);
if (serviceId != 0)
{
var settings = ServerController.GetServiceSettings(serviceId);
deletedUser.StoragePath = settings["ArchiveStoragePath"];
if (!string.IsNullOrEmpty(deletedUser.StoragePath))
{
deletedUser.FolderName = org.OrganizationId;
if (!CheckFolderExists(org.PackageId, deletedUser.StoragePath, deletedUser.FolderName))
{
CreateFolder(org.PackageId, deletedUser.StoragePath, deletedUser.FolderName);
}
QuotaValueInfo diskSpaceQuota = PackageController.GetPackageQuota(org.PackageId, Quotas.ORGANIZATION_DELETED_USERS_BACKUP_STORAGE_SPACE);
if (diskSpaceQuota.QuotaAllocatedValue != -1)
{
SetFRSMQuotaOnFolder(org.PackageId, deletedUser.StoragePath, org.OrganizationId, diskSpaceQuota, QuotaType.Hard);
}
deletedUser.FileName = string.Format("{0}.pst", account.UserPrincipalName);
ExchangeServerController.ExportMailBox(itemId, accountId,
FilesController.ConvertToUncPath(serviceId,
Path.Combine(GetDirectory(deletedUser.StoragePath), deletedUser.FolderName, deletedUser.FileName)));
}
}
}
//Set Deleted Mailbox
ExchangeServerController.SetDeletedMailbox(itemId, accountId);
}
AddDeletedUser(deletedUser);
account.AccountType = ExchangeAccountType.DeletedUser;
UpdateAccount(account);
var taskId = "SCHEDULE_TASK_DELETE_EXCHANGE_ACCOUNTS";
if (!CheckScheduleTaskRun(org.PackageId, taskId))
{
AddScheduleTask(org.PackageId, taskId, "Auto Delete Exchange Account");
}
return 0;
}
catch (Exception ex)
{
throw TaskManager.WriteError(ex);
}
finally
{
TaskManager.CompleteTask();
}
}
public static byte[] GetArchiveFileBinaryChunk(int packageId, string path, int offset, int length)
{
var os = GetOS(packageId);
if (os != null && os.CheckFileServicesInstallation())
{
return os.GetFileBinaryChunk(path, offset, length);
}
return null;
}
private static bool CheckScheduleTaskRun(int packageId, string taskId)
{
var schedules = new List<ScheduleInfo>();
ObjectUtils.FillCollectionFromDataSet(schedules, SchedulerController.GetSchedules(packageId));
foreach(var schedule in schedules)
{
if (schedule.TaskId == taskId)
{
return true;
}
}
return false;
}
private static int AddScheduleTask(int packageId, string taskId, string taskName)
{
return SchedulerController.AddSchedule(new ScheduleInfo
{
PackageId = packageId,
TaskId = taskId,
ScheduleName = taskName,
ScheduleTypeId = "Daily",
FromTime = new DateTime(2000, 1, 1, 0, 0, 0),
ToTime = new DateTime(2000, 1, 1, 23, 59, 59),
Interval = 3600,
StartTime = new DateTime(2000, 01, 01, 0, 30, 0),
MaxExecutionTime = 3600,
PriorityId = "Normal",
Enabled = true,
WeekMonthDay = 1,
HistoriesNumber = 0
});
}
private static bool CheckFolderExists(int packageId, string path, string folderName)
{
var os = GetOS(packageId);
if (os != null && os.CheckFileServicesInstallation())
{
return os.DirectoryExists(Path.Combine(path, folderName));
}
return false;
}
private static void CreateFolder(int packageId, string path, string folderName)
{
var os = GetOS(packageId);
if (os != null && os.CheckFileServicesInstallation())
{
os.CreateDirectory(Path.Combine(path, folderName));
}
}
private static void RemoveArchive(int packageId, string path, string folderName, string fileName)
{
var os = GetOS(packageId);
if (os != null && os.CheckFileServicesInstallation())
{
os.DeleteFile(Path.Combine(path, folderName, fileName));
}
}
private static string GetLocationDrive(string path)
{
var drive = System.IO.Path.GetPathRoot(path);
return drive.Split(':')[0];
}
private static string GetDirectory(string path)
{
var drive = System.IO.Path.GetPathRoot(path);
return path.Replace(drive, string.Empty);
}
private static void SetFRSMQuotaOnFolder(int packageId, string path, string folderName, QuotaValueInfo quotaInfo, QuotaType quotaType)
{
var os = GetOS(packageId);
if (os != null && os.CheckFileServicesInstallation())
{
#region figure Quota Unit
// Quota Unit
string unit = string.Empty;
if (quotaInfo.QuotaDescription.ToLower().Contains("gb"))
unit = "GB";
else if (quotaInfo.QuotaDescription.ToLower().Contains("mb"))
unit = "MB";
else
unit = "KB";
#endregion
os.SetQuotaLimitOnFolder(
Path.Combine(GetDirectory(path), folderName),
GetLocationDrive(path), quotaType,
quotaInfo.QuotaAllocatedValue.ToString() + unit,
0, String.Empty, String.Empty);
}
}
#endregion
public static int DeleteUser(int itemId, int accountId)
{
// check account
@ -1742,7 +2084,7 @@ namespace WebsitePanel.EnterpriseServer
if (accountCheck < 0) return accountCheck;
// place log record
TaskManager.StartTask("ORGANIZATION", "DELETE_USER", itemId);
TaskManager.StartTask("ORGANIZATION", "REMOVE_USER", itemId);
try
{
@ -1770,13 +2112,32 @@ namespace WebsitePanel.EnterpriseServer
return -1;
// load account
OrganizationUser user = GetAccount(itemId, accountId);
ExchangeAccount user = ExchangeServerController.GetAccount(itemId, accountId);
Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
string account = GetAccountName(user.AccountName);
if (user.AccountType == ExchangeAccountType.User)
var accountType = user.AccountType;
if (accountType == ExchangeAccountType.DeletedUser)
{
var deletedUser = GetDeletedUser(user.AccountId);
if (deletedUser != null)
{
accountType = deletedUser.OriginAT;
if (!deletedUser.IsArchiveEmpty)
{
RemoveArchive(org.PackageId, deletedUser.StoragePath, deletedUser.FolderName, deletedUser.FileName);
}
RemoveDeletedUser(deletedUser.Id);
}
}
if (user.AccountType == ExchangeAccountType.User )
{
//Delete user from AD
orgProxy.DeleteUser(account, org.OrganizationId);
@ -1800,6 +2161,30 @@ namespace WebsitePanel.EnterpriseServer
}
}
public static OrganizationDeletedUser GetDeletedUser(int accountId)
{
OrganizationDeletedUser deletedUser = ObjectUtils.FillObjectFromDataReader<OrganizationDeletedUser>(
DataProvider.GetOrganizationDeletedUser(accountId));
if (deletedUser == null)
return null;
deletedUser.IsArchiveEmpty = string.IsNullOrEmpty(deletedUser.FileName);
return deletedUser;
}
private static int AddDeletedUser(OrganizationDeletedUser deletedUser)
{
return DataProvider.AddOrganizationDeletedUser(
deletedUser.AccountId, (int)deletedUser.OriginAT, deletedUser.StoragePath, deletedUser.FolderName, deletedUser.FileName, deletedUser.ExpirationDate);
}
private static void RemoveDeletedUser(int id)
{
DataProvider.DeleteOrganizationDeletedUser(id);
}
public static OrganizationUser GetAccount(int itemId, int userId)
{
OrganizationUser account = ObjectUtils.FillObjectFromDataReader<OrganizationUser>(
@ -3090,6 +3475,22 @@ namespace WebsitePanel.EnterpriseServer
#endregion
#region OS
private static WebsitePanel.Providers.OS.OperatingSystem GetOS(int packageId)
{
int sid = PackageController.GetPackageServiceId(packageId, ResourceGroups.Os);
if (sid <= 0)
return null;
var os = new WebsitePanel.Providers.OS.OperatingSystem();
ServiceProviderProxy.Init(os, sid);
return os;
}
#endregion
public static DataSet GetOrganizationObjectsByDomain(int itemId, string domainName)
{
return DataProvider.GetOrganizationObjectsByDomain(itemId, domainName);

View file

@ -778,7 +778,7 @@ namespace WebsitePanel.EnterpriseServer
// update package
result.ExceedingQuotas = DataProvider.UpdatePackage(SecurityContext.User.UserId,
package.PackageId, package.PlanId, package.PackageName, package.PackageComments, package.StatusId,
package.PurchaseDate, package.OverrideQuotas, quotasXml);
package.PurchaseDate, package.OverrideQuotas, quotasXml, package.DefaultTopPackage);
if (result.ExceedingQuotas.Tables[0].Rows.Count > 0)
result.Result = BusinessErrorCodes.ERROR_PACKAGE_QUOTA_EXCEED;
@ -1742,6 +1742,21 @@ namespace WebsitePanel.EnterpriseServer
//}
}
public static bool SetDefaultTopPackage(int userId, int packageId) {
List<PackageInfo> lpi = GetPackages(userId);
foreach(PackageInfo pi in lpi) {
if(pi.DefaultTopPackage) {
pi.DefaultTopPackage = false;
UpdatePackage(pi);
}
if(pi.PackageId == packageId) {
pi.DefaultTopPackage = true;
UpdatePackage(pi);
}
}
return true;
}
#endregion
#region Quotas

View file

@ -58,12 +58,17 @@ namespace WebsitePanel.EnterpriseServer
return GetRdsCollectionInternal(collectionId);
}
public static RdsCollectionSettings GetRdsCollectionSettings(int collectionId)
{
return GetRdsCollectionSettingsInternal(collectionId);
}
public static List<RdsCollection> GetOrganizationRdsCollections(int itemId)
{
return GetOrganizationRdsCollectionsInternal(itemId);
}
public static ResultObject AddRdsCollection(int itemId, RdsCollection collection)
public static int AddRdsCollection(int itemId, RdsCollection collection)
{
return AddRdsCollectionInternal(itemId, collection);
}
@ -73,6 +78,11 @@ namespace WebsitePanel.EnterpriseServer
return EditRdsCollectionInternal(itemId, collection);
}
public static ResultObject EditRdsCollectionSettings(int itemId, RdsCollection collection)
{
return EditRdsCollectionSettingsInternal(itemId, collection);
}
public static RdsCollectionPaged GetRdsCollectionsPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
{
return GetRdsCollectionsPagedInternal(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
@ -93,9 +103,14 @@ namespace WebsitePanel.EnterpriseServer
return GetRdsServersPagedInternal(filterColumn, filterValue, sortColumn, startRow, maximumRows);
}
public static RdsServersPaged GetFreeRdsServersPaged(string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
public static List<RdsUserSession> GetRdsUserSessions(int collectionId)
{
return GetFreeRdsServersPagedInternal(filterColumn, filterValue, sortColumn, startRow, maximumRows);
return GetRdsUserSessionsInternal(collectionId);
}
public static RdsServersPaged GetFreeRdsServersPaged(int packageId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
{
return GetFreeRdsServersPagedInternal(packageId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
}
public static RdsServersPaged GetOrganizationRdsServersPaged(int itemId, int? collectionId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
@ -203,6 +218,16 @@ namespace WebsitePanel.EnterpriseServer
return GetOrganizationRdsUsersCountInternal(itemId);
}
public static int GetOrganizationRdsServersCount(int itemId)
{
return GetOrganizationRdsServersCountInternal(itemId);
}
public static int GetOrganizationRdsCollectionsCount(int itemId)
{
return GetOrganizationRdsCollectionsCountInternal(itemId);
}
public static List<string> GetApplicationUsers(int itemId, int collectionId, RemoteApplication remoteApp)
{
return GetApplicationUsersInternal(itemId, collectionId, remoteApp);
@ -213,16 +238,28 @@ namespace WebsitePanel.EnterpriseServer
return SetApplicationUsersInternal(itemId, collectionId, remoteApp, users);
}
public static ResultObject LogOffRdsUser(int itemId, string unifiedSessionId, string hostServer)
{
return LogOffRdsUserInternal(itemId, unifiedSessionId, hostServer);
}
public static List<string> GetRdsCollectionSessionHosts(int collectionId)
{
return GetRdsCollectionSessionHostsInternal(collectionId);
}
private static RdsCollection GetRdsCollectionInternal(int collectionId)
{
var collection = ObjectUtils.FillObjectFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionById(collectionId));
var collectionSettings = ObjectUtils.FillObjectFromDataReader<RdsCollectionSettings>(DataProvider.GetRdsCollectionSettingsByCollectionId(collectionId));
collection.Settings = collectionSettings;
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "ADD_RDS_COLLECTION");
try
{
// load organization
Organization org = OrganizationController.GetOrganization(4115);
Organization org = OrganizationController.GetOrganization(collection.ItemId);
if (org == null)
{
result.IsSuccess = false;
@ -243,6 +280,13 @@ namespace WebsitePanel.EnterpriseServer
return collection;
}
private static RdsCollectionSettings GetRdsCollectionSettingsInternal(int collectionId)
{
var collection = ObjectUtils.FillObjectFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionById(collectionId));
return ObjectUtils.FillObjectFromDataReader<RdsCollectionSettings>(DataProvider.GetRdsCollectionSettingsByCollectionId(collectionId));
}
private static List<RdsCollection> GetOrganizationRdsCollectionsInternal(int itemId)
{
var collections = ObjectUtils.CreateListFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionsByItemId(itemId));
@ -255,7 +299,7 @@ namespace WebsitePanel.EnterpriseServer
return collections;
}
private static ResultObject AddRdsCollectionInternal(int itemId, RdsCollection collection)
private static int AddRdsCollectionInternal(int itemId, RdsCollection collection)
{
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "ADD_RDS_COLLECTION");
@ -265,16 +309,42 @@ namespace WebsitePanel.EnterpriseServer
Organization org = OrganizationController.GetOrganization(itemId);
if (org == null)
{
result.IsSuccess = false;
result.AddError("", new NullReferenceException("Organization not found"));
return result;
return -1;
}
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
collection.Name = GetFormattedCollectionName(collection.DisplayName, org.OrganizationId);
collection.Settings = new RdsCollectionSettings
{
DisconnectedSessionLimitMin = 0,
ActiveSessionLimitMin = 0,
IdleSessionLimitMin = 0,
BrokenConnectionAction = BrokenConnectionActionValues.Disconnect.ToString(),
AutomaticReconnectionEnabled = true,
TemporaryFoldersDeletedOnExit = true,
TemporaryFoldersPerSession = true,
ClientDeviceRedirectionOptions = string.Join(",", new List<string>
{
ClientDeviceRedirectionOptionValues.AudioVideoPlayBack.ToString(),
ClientDeviceRedirectionOptionValues.AudioRecording.ToString(),
ClientDeviceRedirectionOptionValues.SmartCard.ToString(),
ClientDeviceRedirectionOptionValues.Clipboard.ToString(),
ClientDeviceRedirectionOptionValues.Drive.ToString(),
ClientDeviceRedirectionOptionValues.PlugAndPlayDevice.ToString()
}.ToArray()),
ClientPrinterRedirected = true,
ClientPrinterAsDefault = true,
RDEasyPrintDriverEnabled = true,
MaxRedirectedMonitors = 16
};
rds.CreateCollection(org.OrganizationId, collection);
collection.Id = DataProvider.AddRDSCollection(itemId, collection.Name, collection.Description, collection.DisplayName);
collection.Id = DataProvider.AddRDSCollection(itemId, collection.Name, collection.Description);
collection.Settings.RdsCollectionId = collection.Id;
int settingsId = DataProvider.AddRdsCollectionSettings(collection.Settings);
collection.Settings.Id = settingsId;
foreach (var server in collection.Servers)
{
@ -283,7 +353,6 @@ namespace WebsitePanel.EnterpriseServer
}
catch (Exception ex)
{
result.AddError("REMOTE_DESKTOP_SERVICES_ADD_RDS_COLLECTION", ex);
throw TaskManager.WriteError(ex);
}
finally
@ -298,7 +367,7 @@ namespace WebsitePanel.EnterpriseServer
}
}
return result;
return collection.Id;
}
private static ResultObject EditRdsCollectionInternal(int itemId, RdsCollection collection)
@ -327,7 +396,7 @@ namespace WebsitePanel.EnterpriseServer
DataProvider.RemoveRDSServerFromCollection(server.Id);
}
rds.AddRdsServersToDeployment(newServers.ToArray());
rds.AddSessionHostServersToCollection(org.OrganizationId, collection.Name, newServers.ToArray());
foreach (var server in newServers)
{
@ -353,6 +422,54 @@ namespace WebsitePanel.EnterpriseServer
return result;
}
private static ResultObject EditRdsCollectionSettingsInternal(int itemId, RdsCollection collection)
{
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "EDIT_RDS_COLLECTION_SETTINGS");
try
{
Organization org = OrganizationController.GetOrganization(itemId);
if (org == null)
{
result.IsSuccess = false;
result.AddError("", new NullReferenceException("Organization not found"));
return result;
}
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
rds.EditRdsCollectionSettings(collection);
var collectionSettings = ObjectUtils.FillObjectFromDataReader<RdsCollectionSettings>(DataProvider.GetRdsCollectionSettingsByCollectionId(collection.Id));
if (collectionSettings == null)
{
DataProvider.AddRdsCollectionSettings(collection.Settings);
}
else
{
DataProvider.UpdateRDSCollectionSettings(collection.Settings);
}
}
catch (Exception ex)
{
result.AddError("REMOTE_DESKTOP_SERVICES_ADD_RDS_COLLECTION", ex);
throw TaskManager.WriteError(ex);
}
finally
{
if (!result.IsSuccess)
{
TaskManager.CompleteResultTask(result);
}
else
{
TaskManager.CompleteResultTask();
}
}
return result;
}
private static RdsCollectionPaged GetRdsCollectionsPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
{
DataSet ds = DataProvider.GetRDSCollectionsPaged(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
@ -477,22 +594,64 @@ namespace WebsitePanel.EnterpriseServer
return result;
}
private static RdsServersPaged GetFreeRdsServersPagedInternal(string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
private static List<RdsUserSession> GetRdsUserSessionsInternal(int collectionId)
{
DataSet ds = DataProvider.GetRDSServersPaged(null, null, filterColumn, filterValue, sortColumn, startRow, maximumRows);
var result = new List<RdsUserSession>();
var collection = ObjectUtils.FillObjectFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionById(collectionId));
var organization = OrganizationController.GetOrganization(collection.ItemId);
if (organization == null)
{
return result;
}
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(organization.PackageId));
return rds.GetRdsUserSessions(collection.Name).ToList();
}
private static RdsServersPaged GetFreeRdsServersPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
{
RdsServersPaged result = new RdsServersPaged();
Organization org = OrganizationController.GetOrganization(itemId);
if (org == null)
{
return result;
}
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
var existingServers = rds.GetServersExistingInCollections();
DataSet ds = DataProvider.GetRDSServersPaged(null, null, filterColumn, filterValue, sortColumn, startRow, maximumRows);
result.RecordsCount = (int)ds.Tables[0].Rows[0][0];
List<RdsServer> tmpServers = new List<RdsServer>();
ObjectUtils.FillCollectionFromDataView(tmpServers, ds.Tables[1].DefaultView);
tmpServers = tmpServers.Where(x => !existingServers.Select(y => y.ToUpper()).Contains(x.FqdName.ToUpper())).ToList();
result.Servers = tmpServers.ToArray();
return result;
}
private static List<string> GetRdsCollectionSessionHostsInternal(int collectionId)
{
var result = new List<string>();
var collection = ObjectUtils.FillObjectFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionById(collectionId));
Organization org = OrganizationController.GetOrganization(collection.ItemId);
if (org == null)
{
return result;
}
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
result = rds.GetRdsCollectionSessionHosts(collection.Name).ToList();
return result;
}
private static RdsServersPaged GetOrganizationRdsServersPagedInternal(int itemId, int? collectionId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
{
DataSet ds = DataProvider.GetRDSServersPaged(itemId, collectionId, filterColumn, filterValue, sortColumn, startRow, maximumRows, ignoreRdsCollectionId: !collectionId.HasValue);
@ -583,6 +742,15 @@ namespace WebsitePanel.EnterpriseServer
return DataProvider.GetOrganizationRdsUsersCount(itemId);
}
private static int GetOrganizationRdsServersCountInternal(int itemId)
{
return DataProvider.GetOrganizationRdsServersCount(itemId);
}
private static int GetOrganizationRdsCollectionsCountInternal(int itemId)
{
return DataProvider.GetOrganizationRdsCollectionsCount(itemId);
}
private static List<RdsServer> GetCollectionRdsServersInternal(int collectionId)
{
@ -985,6 +1153,44 @@ namespace WebsitePanel.EnterpriseServer
return result;
}
private static ResultObject LogOffRdsUserInternal(int itemId, string unifiedSessionId, string hostServer)
{
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "LOG_OFF_RDS_USER");
try
{
Organization org = OrganizationController.GetOrganization(itemId);
if (org == null)
{
result.IsSuccess = false;
result.AddError("LOG_OFF_RDS_USER", new NullReferenceException("Organization not found"));
return result;
}
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
rds.LogOffRdsUser(unifiedSessionId, hostServer);
}
catch (Exception ex)
{
result.AddError("REMOTE_DESKTOP_SERVICES_LOG_OFF_RDS_USER", ex);
}
finally
{
if (!result.IsSuccess)
{
TaskManager.CompleteResultTask(result);
}
else
{
TaskManager.CompleteResultTask();
}
}
return result;
}
private static ResultObject AddRemoteApplicationToCollectionInternal(int itemId, RdsCollection collection, RemoteApplication remoteApp)
{
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "ADD_REMOTE_APP_TO_COLLECTION");
@ -1238,5 +1444,10 @@ namespace WebsitePanel.EnterpriseServer
return rds;
}
private static string GetFormattedCollectionName(string displayName, string organizationId)
{
return string.Format("{0}-{1}", organizationId, displayName.Replace(" ", "_"));
}
}
}

View file

@ -0,0 +1,64 @@
// 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;
using System.Diagnostics;
using System.Collections.Generic;
using System.Text;
using WebsitePanel.Providers.Exchange;
using WebsitePanel.Providers.HostedSolution;
namespace WebsitePanel.EnterpriseServer
{
public class DeleteExchangeAccountsTask : SchedulerTask
{
public override void DoWork()
{
DeletedAccounts();
}
public void DeletedAccounts()
{
List<Organization> organizations = OrganizationController.GetOrganizations(TaskManager.TopTask.PackageId, true);
foreach (Organization organization in organizations)
{
List<OrganizationDeletedUser> deletedUsers = OrganizationController.GetOrganizationDeletedUsers(organization.Id);
foreach (OrganizationDeletedUser deletedUser in deletedUsers)
{
if (deletedUser.ExpirationDate > DateTime.UtcNow)
{
OrganizationController.DeleteUser(TaskManager.TopTask.ItemId, deletedUser.AccountId);
}
}
}
}
}
}

View file

@ -1,4 +1,4 @@
// Copyright (c) 2015, Outercurve Foundation.
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
@ -57,7 +57,7 @@ namespace WebsitePanel.EnterpriseServer
{
BackgroundTask topTask = TaskManager.TopTask;
var domainUsers = new Dictionary<int, UserInfo>();
var checkedDomains = new List<int>();
var checkedDomains = new List<DomainInfo>();
var expiredDomains = new List<DomainInfo>();
var nonExistenDomains = new List<DomainInfo>();
var allDomains = new List<DomainInfo>();
@ -101,12 +101,12 @@ namespace WebsitePanel.EnterpriseServer
foreach (var domain in domains)
{
if (checkedDomains.Contains(domain.DomainId))
if (checkedDomains.Any(x=> x.DomainId == domain.DomainId))
{
continue;
}
checkedDomains.Add(domain.DomainId);
checkedDomains.Add(domain);
ServerController.UpdateDomainWhoisData(domain);
@ -124,12 +124,11 @@ namespace WebsitePanel.EnterpriseServer
}
}
var subDomains = allDomains.Where(x => x.ExpirationDate == null || CheckDomainExpiration(x.ExpirationDate, daysBeforeNotify)).GroupBy(p => p.DomainId).Select(g => g.First()).ToList();
allTopLevelDomains = allTopLevelDomains.GroupBy(p => p.DomainId).Select(g => g.First()).ToList();
var subDomains = allDomains.Where(x => !checkedDomains.Any(z => z.DomainId == x.DomainId && z.ExpirationDate != null)).GroupBy(p => p.DomainId).Select(g => g.First()).ToList();
foreach (var subDomain in subDomains)
{
var mainDomain = allTopLevelDomains.Where(x => subDomain.DomainId != x.DomainId && subDomain.DomainName.ToLowerInvariant().Contains(x.DomainName.ToLowerInvariant())).OrderByDescending(s => s.DomainName.Length).FirstOrDefault(); ;
var mainDomain = checkedDomains.Where(x => subDomain.DomainId != x.DomainId && subDomain.DomainName.ToLowerInvariant().Contains(x.DomainName.ToLowerInvariant())).OrderByDescending(s => s.DomainName.Length).FirstOrDefault(); ;
if (mainDomain != null)
{

View file

@ -2709,6 +2709,7 @@ namespace WebsitePanel.EnterpriseServer
domain.CreationDate = ParseDate(creationDateString);
domain.ExpirationDate = ParseDate(expirationDateString);
domain.RegistrarName = ParseWhoisDomainInfo(whoisResult.Raw, _registrarNamePatterns);
domain.LastUpdateDate = DateTime.Now;
DataProvider.UpdateWhoisDomainInfo(domain.DomainId, domain.CreationDate, domain.ExpirationDate, DateTime.Now, domain.RegistrarName);
}
@ -2727,6 +2728,7 @@ namespace WebsitePanel.EnterpriseServer
domain.CreationDate = creationDate;
domain.ExpirationDate = expirationDate;
domain.RegistrarName = registrarName;
domain.LastUpdateDate = DateTime.Now;
return domain;
}

View file

@ -3633,6 +3633,17 @@ namespace WebsitePanel.EnterpriseServer
WebServer server = GetWebServer(item.ServiceId);
//
server.RevokeWebManagementAccess(item.SiteId, accountName);
// Cleanup web site properties if the web management and web deploy user are the same
if (GetNonQualifiedAccountName(accountName) == item.WebDeployPublishingAccount)
{
item.WebDeployPublishingAccount = String.Empty;
item.WebDeploySitePublishingEnabled = false;
item.WebDeploySitePublishingProfile = String.Empty;
item.WebDeployPublishingPassword = String.Empty;
// Put changes into effect
PackageController.UpdatePackageItem(item);
}
}
catch (Exception ex)
{
@ -3644,6 +3655,12 @@ namespace WebsitePanel.EnterpriseServer
}
}
protected static string GetNonQualifiedAccountName(string accountName)
{
int idx = accountName.LastIndexOf("\\");
return (idx != -1) ? accountName.Substring(idx + 1) : accountName;
}
public static ResultObject ChangeWebManagementAccessPassword(int siteItemId, string accountPassword)
{
ResultObject result = new ResultObject { IsSuccess = true };

View file

@ -141,6 +141,7 @@
<Compile Include="SchedulerTasks\ActivatePaidInvoicesTask.cs" />
<Compile Include="SchedulerTasks\BackupDatabaseTask.cs" />
<Compile Include="SchedulerTasks\BackupTask.cs" />
<Compile Include="SchedulerTasks\DeleteExchangeAccountsTask.cs" />
<Compile Include="SchedulerTasks\CalculateExchangeDiskspaceTask.cs" />
<Compile Include="SchedulerTasks\CalculatePackagesBandwidthTask.cs" />
<Compile Include="SchedulerTasks\CalculatePackagesDiskspaceTask.cs" />

View file

@ -5,8 +5,7 @@
</configSections>
<!-- Connection strings -->
<connectionStrings>
<!--<add name="EnterpriseServer" connectionString="Server=(local)\SQLExpress;Database=WebsitePanel;uid=sa;pwd=Password12" providerName="System.Data.SqlClient"/>-->
<add name="EnterpriseServer" connectionString="Data Source=CHERNETSI\BENQMSSERVER;Initial Catalog=WebsitePanel;uid=sa;pwd=Password12;Integrated Security=True;" providerName="System.Data.SqlClient" />
<add name="EnterpriseServer" connectionString="Server=(local)\SQLExpress;Database=WebsitePanel;uid=sa;pwd=Password12" providerName="System.Data.SqlClient"/>
</connectionStrings>
<appSettings>
<!-- Encryption util settings -->

View file

@ -56,6 +56,29 @@ namespace WebsitePanel.EnterpriseServer
[ToolboxItem(false)]
public class esEnterpriseStorage : WebService
{
[WebMethod]
public int AddWebDavAccessToken(WebDavAccessToken accessToken)
{
return EnterpriseStorageController.AddWebDavAccessToken(accessToken);
}
[WebMethod]
public void DeleteExpiredWebDavAccessTokens()
{
EnterpriseStorageController.DeleteExpiredWebDavAccessTokens();
}
[WebMethod]
public WebDavAccessToken GetWebDavAccessTokenById(int id)
{
return EnterpriseStorageController.GetWebDavAccessTokenById(id);
}
[WebMethod]
public WebDavAccessToken GetWebDavAccessTokenByAccessToken(Guid accessToken)
{
return EnterpriseStorageController.GetWebDavAccessTokenByAccessToken(accessToken);
}
[WebMethod]
public bool CheckFileServicesInstallation(int serviceId)

View file

@ -344,6 +344,18 @@ namespace WebsitePanel.EnterpriseServer
return ExchangeServerController.SetMailboxPermissions(itemId, accountId, sendAsaccounts, fullAccessAcounts);
}
[WebMethod]
public int ExportMailBox(int itemId, int accountId, string path)
{
return ExchangeServerController.ExportMailBox(itemId, accountId, path);
}
[WebMethod]
public int SetDeletedMailbox(int itemId, int accountId)
{
return ExchangeServerController.SetDeletedMailbox(itemId, accountId);
}
#endregion

View file

@ -193,6 +193,12 @@ namespace WebsitePanel.EnterpriseServer
return OrganizationController.ImportUser(itemId, accountName, displayName, name, domain, password, subscriberNumber);
}
[WebMethod]
public OrganizationDeletedUsersPaged GetOrganizationDeletedUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn,
int startRow, int maximumRows)
{
return OrganizationController.GetOrganizationDeletedUsersPaged(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows);
}
[WebMethod]
public OrganizationUsersPaged GetOrganizationUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn,
@ -248,6 +254,17 @@ namespace WebsitePanel.EnterpriseServer
filterColumn, filterValue, sortColumn, includeMailboxes);
}
[WebMethod]
public int SetDeletedUser(int itemId, int accountId, bool enableForceArchive)
{
return OrganizationController.SetDeletedUser(itemId, accountId, enableForceArchive);
}
[WebMethod]
public byte[] GetArchiveFileBinaryChunk(int packageId, string path, int offset, int length)
{
return OrganizationController.GetArchiveFileBinaryChunk(packageId, path, offset, length);
}
[WebMethod]
public int DeleteUser(int itemId, int accountId)

View file

@ -262,6 +262,11 @@ namespace WebsitePanel.EnterpriseServer
return PackageController.UpdatePackageSettings(settings);
}
[WebMethod]
public bool SetDefaultTopPackage(int userId, int packageId) {
return PackageController.SetDefaultTopPackage(userId, packageId);
}
#endregion
#region Package Add-ons

View file

@ -58,6 +58,12 @@ namespace WebsitePanel.EnterpriseServer
return RemoteDesktopServicesController.GetRdsCollection(collectionId);
}
[WebMethod]
public RdsCollectionSettings GetRdsCollectionSettings(int collectionId)
{
return RemoteDesktopServicesController.GetRdsCollectionSettings(collectionId);
}
[WebMethod]
public List<RdsCollection> GetOrganizationRdsCollections(int itemId)
{
@ -65,7 +71,7 @@ namespace WebsitePanel.EnterpriseServer
}
[WebMethod]
public ResultObject AddRdsCollection(int itemId, RdsCollection collection)
public int AddRdsCollection(int itemId, RdsCollection collection)
{
return RemoteDesktopServicesController.AddRdsCollection(itemId, collection);
}
@ -76,6 +82,12 @@ namespace WebsitePanel.EnterpriseServer
return RemoteDesktopServicesController.EditRdsCollection(itemId, collection);
}
[WebMethod]
public ResultObject EditRdsCollectionSettings(int itemId, RdsCollection collection)
{
return RemoteDesktopServicesController.EditRdsCollectionSettings(itemId, collection);
}
[WebMethod]
public RdsCollectionPaged GetRdsCollectionsPaged(int itemId, string filterColumn, string filterValue,
string sortColumn, int startRow, int maximumRows)
@ -99,10 +111,10 @@ namespace WebsitePanel.EnterpriseServer
}
[WebMethod]
public RdsServersPaged GetFreeRdsServersPaged(string filterColumn, string filterValue,
public RdsServersPaged GetFreeRdsServersPaged(int packageId, string filterColumn, string filterValue,
string sortColumn, int startRow, int maximumRows)
{
return RemoteDesktopServicesController.GetFreeRdsServersPaged(filterColumn, filterValue,
return RemoteDesktopServicesController.GetFreeRdsServersPaged(packageId, filterColumn, filterValue,
sortColumn, startRow, maximumRows);
}
@ -236,6 +248,18 @@ namespace WebsitePanel.EnterpriseServer
return RemoteDesktopServicesController.GetOrganizationRdsUsersCount(itemId);
}
[WebMethod]
public int GetOrganizationRdsServersCount(int itemId)
{
return RemoteDesktopServicesController.GetOrganizationRdsServersCount(itemId);
}
[WebMethod]
public int GetOrganizationRdsCollectionsCount(int itemId)
{
return RemoteDesktopServicesController.GetOrganizationRdsCollectionsCount(itemId);
}
[WebMethod]
public List<string> GetApplicationUsers(int itemId, int collectionId, RemoteApplication remoteApp)
{
@ -247,5 +271,23 @@ namespace WebsitePanel.EnterpriseServer
{
return RemoteDesktopServicesController.SetApplicationUsers(itemId, collectionId, remoteApp, users);
}
[WebMethod]
public List<RdsUserSession> GetRdsUserSessions(int collectionId)
{
return RemoteDesktopServicesController.GetRdsUserSessions(collectionId);
}
[WebMethod]
public ResultObject LogOffRdsUser(int itemId, string unifiedSessionId, string hostServer)
{
return RemoteDesktopServicesController.LogOffRdsUser(itemId, unifiedSessionId, hostServer);
}
[WebMethod]
public List<string> GetRdsCollectionSessionHosts(int collectionId)
{
return RemoteDesktopServicesController.GetRdsCollectionSessionHosts(collectionId);
}
}
}

View file

@ -40,6 +40,7 @@ namespace WebsitePanel.Providers.HostedSolution
User = 7,
SecurityGroup = 8,
DefaultSecurityGroup = 9,
SharedMailbox = 10
SharedMailbox = 10,
DeletedUser = 11
}
}

View file

@ -247,6 +247,13 @@ namespace WebsitePanel.Providers.HostedSolution
set { this.archiveWarningPct = value; }
}
bool enableForceArchiveDeletion;
public bool EnableForceArchiveDeletion
{
get { return this.enableForceArchiveDeletion; }
set { this.enableForceArchiveDeletion = value; }
}
public string WSPUniqueName
{
get

View file

@ -143,6 +143,7 @@ namespace WebsitePanel.Providers.HostedSolution
int RemoveDisclamerMember(string name, string member);
// Archiving
ResultObject ExportMailBox(string organizationId, string accountName, string storagePath);
ResultObject SetMailBoxArchiving(string organizationId, string accountName, bool archive, long archiveQuotaKB, long archiveWarningQuotaKB, string RetentionPolicy);
// Retention policy

View file

@ -39,6 +39,8 @@ namespace WebsitePanel.Providers.HostedSolution
int CreateUser(string organizationId, string loginName, string displayName, string upn, string password, bool enabled);
void DisableUser(string loginName, string organizationId);
void DeleteUser(string loginName, string organizationId);
OrganizationUser GetUserGeneralSettings(string loginName, string organizationId);

View file

@ -0,0 +1,53 @@
// 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.Providers.HostedSolution
{
public class OrganizationDeletedUser
{
public int Id { get; set; }
public int AccountId { get; set; }
public ExchangeAccountType OriginAT { get; set; }
public string StoragePath { get; set; }
public string FolderName { get; set; }
public string FileName { get; set; }
public DateTime ExpirationDate { get; set; }
public OrganizationUser User { get; set; }
public bool IsArchiveEmpty { get; set; }
}
}

View file

@ -0,0 +1,48 @@
// 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.
namespace WebsitePanel.Providers.HostedSolution
{
public class OrganizationDeletedUsersPaged
{
int recordsCount;
OrganizationDeletedUser[] pageDeletedUsers;
public int RecordsCount
{
get { return recordsCount; }
set { recordsCount = value; }
}
public OrganizationDeletedUser[] PageDeletedUsers
{
get { return pageDeletedUsers; }
set { pageDeletedUsers = value; }
}
}
}

View file

@ -82,6 +82,12 @@ namespace WebsitePanel.Providers.HostedSolution
private int createdProfessionalCRMUsers;
private int allocatedProfessionalCRMUsers;
private int allocatedDeletedUsers;
private int deletedUsers;
private int allocatedDeletedUsersBackupStorageSpace;
private int usedDeletedUsersBackupStorageSpace;
public int CreatedProfessionalCRMUsers
{
get { return createdProfessionalCRMUsers; }
@ -370,7 +376,35 @@ namespace WebsitePanel.Providers.HostedSolution
set { createdResourceMailboxes = value; }
}
public int AllocatedDeletedUsers
{
get { return allocatedDeletedUsers; }
set { allocatedDeletedUsers = value; }
}
public int DeletedUsers
{
get { return deletedUsers; }
set { deletedUsers = value; }
}
public int AllocatedDeletedUsersBackupStorageSpace
{
get { return allocatedDeletedUsersBackupStorageSpace; }
set { allocatedDeletedUsersBackupStorageSpace = value; }
}
public int UsedDeletedUsersBackupStorageSpace
{
get { return usedDeletedUsersBackupStorageSpace; }
set { usedDeletedUsersBackupStorageSpace = value; }
}
public int CreatedRdsServers { get; set; }
public int CreatedRdsCollections { get; set; }
public int CreatedRdsUsers { get; set; }
public int AllocatedRdsServers { get; set; }
public int AllocatedRdsCollections { get; set; }
public int AllocatedRdsUsers { get; set; }
}
}

View file

@ -64,5 +64,10 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
string[] GetApplicationUsers(string collectionName, string applicationName);
bool SetApplicationUsers(string collectionName, RemoteApplication remoteApp, string[] users);
bool CheckRDSServerAvaliable(string hostname);
List<string> GetServersExistingInCollections();
void EditRdsCollectionSettings(RdsCollection collection);
List<RdsUserSession> GetRdsUserSessions(string collectionName);
void LogOffRdsUser(string unifiedSessionId, string hostServer);
List<string> GetRdsCollectionSessionHosts(string collectionName);
}
}

View file

@ -37,13 +37,15 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
public RdsCollection()
{
Servers = new List<RdsServer>();
Settings = new RdsCollectionSettings();
}
public int Id { get; set; }
public int ItemId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string DisplayName { get; set; }
public List<RdsServer> Servers { get; set; }
public RdsCollectionSettings Settings { get; set; }
}
}

View file

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.RemoteDesktopServices
{
[Serializable]
public class RdsCollectionSettings
{
public int Id { get; set; }
public int RdsCollectionId { get; set; }
public int DisconnectedSessionLimitMin { get; set; }
public int ActiveSessionLimitMin { get; set; }
public int IdleSessionLimitMin { get; set; }
public string BrokenConnectionAction { get; set; }
public bool AutomaticReconnectionEnabled { get; set; }
public bool TemporaryFoldersDeletedOnExit { get; set; }
public bool TemporaryFoldersPerSession { get; set; }
public string ClientDeviceRedirectionOptions { get; set; }
public bool ClientPrinterRedirected { get; set; }
public bool ClientPrinterAsDefault { get; set; }
public bool RDEasyPrintDriverEnabled { get; set; }
public int MaxRedirectedMonitors { get; set; }
}
}

View file

@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.RemoteDesktopServices
{
public enum BrokenConnectionActionValues
{
Disconnect,
LogOff
}
public enum ClientDeviceRedirectionOptionValues
{
AudioVideoPlayBack,
AudioRecording,
SmartCard,
PlugAndPlayDevice,
Drive,
Clipboard
}
public enum SecurityLayerValues
{
RDP,
Negotiate,
SSL
}
public enum EncryptionLevel
{
Low,
ClientCompatible,
High,
FipsCompliant
}
}

View file

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.RemoteDesktopServices
{
public class RdsUserSession
{
public string CollectionName { get; set; }
public string UserName { get; set; }
public string UnifiedSessionId { get; set; }
public string SessionState { get; set; }
public string HostServer { get; set; }
public string DomainName { get; set; }
}
}

View file

@ -35,5 +35,6 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
public string FilePath { get; set; }
public string FileVirtualPath { get; set; }
public bool ShowInWebAccess { get; set; }
public string RequiredCommandLine { get; set; }
}
}

View file

@ -33,5 +33,6 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
public string DisplayName { get; set; }
public string FilePath { get; set; }
public string FileVirtualPath { get; set; }
public string RequiredCommandLine { get; set; }
}
}

View file

@ -120,6 +120,8 @@
<Compile Include="HostedSolution\LyncUsersPaged.cs" />
<Compile Include="HostedSolution\LyncVoicePolicyType.cs" />
<Compile Include="HostedSolution\OrganizationSecurityGroup.cs" />
<Compile Include="HostedSolution\OrganizationDeletedUser.cs" />
<Compile Include="HostedSolution\OrganizationDeletedUsersPaged.cs" />
<Compile Include="HostedSolution\TransactionAction.cs" />
<Compile Include="OS\MappedDrivesPaged.cs" />
<Compile Include="OS\MappedDrive.cs" />
@ -129,9 +131,12 @@
<Compile Include="RemoteDesktopServices\IRemoteDesktopServices.cs" />
<Compile Include="RemoteDesktopServices\RdsCollection.cs" />
<Compile Include="RemoteDesktopServices\RdsCollectionPaged.cs" />
<Compile Include="RemoteDesktopServices\RdsCollectionSettings.cs" />
<Compile Include="RemoteDesktopServices\RdsEnums.cs" />
<Compile Include="RemoteDesktopServices\RdsPolicyTypes.cs" />
<Compile Include="RemoteDesktopServices\RdsServer.cs" />
<Compile Include="RemoteDesktopServices\RdsServersPaged.cs" />
<Compile Include="RemoteDesktopServices\RdsUserSession.cs" />
<Compile Include="RemoteDesktopServices\RemoteApplication.cs" />
<Compile Include="RemoteDesktopServices\SessionHostServer.cs" />
<Compile Include="RemoteDesktopServices\StartMenuApp.cs" />

View file

@ -7482,6 +7482,43 @@ namespace WebsitePanel.Providers.HostedSolution
#region Archiving
public ResultObject ExportMailBox(string organizationId, string accountName, string storagePath)
{
return ExportMailBoxInternal(organizationId, accountName, storagePath);
}
public ResultObject ExportMailBoxInternal(string organizationId, string accountName, string storagePath)
{
ExchangeLog.LogStart("ExportMailBoxInternal");
ExchangeLog.DebugInfo("Account: {0}", accountName);
ResultObject res = new ResultObject() { IsSuccess = true };
Runspace runSpace = null;
Runspace runSpaceEx = null;
try
{
runSpace = OpenRunspace();
runSpaceEx = OpenRunspaceEx();
Command cmd = new Command("New-MailboxExportRequest");
cmd.Parameters.Add("Mailbox", accountName);
cmd.Parameters.Add("FilePath", storagePath);
ExecuteShellCommand(runSpace, cmd, res);
}
finally
{
CloseRunspace(runSpace);
CloseRunspaceEx(runSpaceEx);
}
ExchangeLog.LogEnd("ExportMailBoxInternal");
return res;
}
public ResultObject SetMailBoxArchiving(string organizationId, string accountName, bool archive, long archiveQuotaKB, long archiveWarningQuotaKB, string RetentionPolicy)
{
return SetMailBoxArchivingInternal(organizationId, accountName, archive, archiveQuotaKB, archiveWarningQuotaKB, RetentionPolicy);

View file

@ -7103,6 +7103,13 @@ namespace WebsitePanel.Providers.HostedSolution
#endregion
#region Archiving
public virtual ResultObject ExportMailBox(string organizationId, string accountName, string storagePath)
{
// not implemented
return null;
}
public virtual ResultObject SetMailBoxArchiving(string organizationId, string accountName, bool archive, long archiveQuotaKB, long archiveWarningQuotaKB, string RetentionPolicy)
{
// not implemented

View file

@ -526,6 +526,36 @@ namespace WebsitePanel.Providers.HostedSolution
return res;
}
public void DisableUser(string loginName, string organizationId)
{
DisableUserInternal(loginName, organizationId);
}
public void DisableUserInternal(string loginName, string organizationId)
{
HostedSolutionLog.LogStart("DisableUserInternal");
HostedSolutionLog.DebugInfo("loginName : {0}", loginName);
HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId);
if (string.IsNullOrEmpty(loginName))
throw new ArgumentNullException("loginName");
if (string.IsNullOrEmpty(organizationId))
throw new ArgumentNullException("organizationId");
string path = GetUserPath(organizationId, loginName);
if (ActiveDirectoryUtils.AdObjectExists(path))
{
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
entry.InvokeSet(ADAttributes.AccountDisabled, true);
entry.CommitChanges();
}
HostedSolutionLog.LogEnd("DisableUserInternal");
}
public void DeleteUser(string loginName, string organizationId)
{

View file

@ -477,7 +477,7 @@ namespace WebsitePanel.Providers.Mail
Log.WriteStart(String.Format("Calculating mail account '{0}' size", item.Name));
// calculate disk space
var accountObject = GetAccountObject(item.Name);
var size = Convert.ToInt64((object)accountObject.GetProperty("U_MailboxSize"));
var size = Convert.ToInt64((object)accountObject.GetProperty("U_MailboxSize")) * 1024;
var diskspace = new ServiceProviderItemDiskSpace {ItemId = item.Id, DiskSpace = size};
itemsDiskspace.Add(diskspace);
@ -564,8 +564,8 @@ namespace WebsitePanel.Providers.Mail
Year = date.Year,
Month = date.Month,
Day = date.Day,
BytesSent = line[mailSentField],
BytesReceived = line[mailReceivedField]
BytesSent = Convert.ToInt64(fields[mailSentField])*1024,
BytesReceived = Convert.ToInt64(fields[mailReceivedField])*1024
};
days.Add(dailyStats);
continue;
@ -836,7 +836,7 @@ namespace WebsitePanel.Providers.Mail
Enabled = Convert.ToInt32((object) accountObject.GetProperty("U_AccountDisabled")) == 0,
ForwardingEnabled = !string.IsNullOrWhiteSpace(accountObject.GetProperty("U_ForwardTo")) || string.IsNullOrWhiteSpace(accountObject.GetProperty("U_RemoteAddress")) && Convert.ToBoolean((object) accountObject.GetProperty("U_UseRemoteAddress")),
IsDomainAdmin = Convert.ToBoolean((object) accountObject.GetProperty("U_DomainAdmin")),
MaxMailboxSize = Convert.ToInt32((object) accountObject.GetProperty("U_MaxBoxSize"))/1024,
MaxMailboxSize = Convert.ToBoolean((object) accountObject.GetProperty("U_MaxBox")) ? Convert.ToInt32((object) accountObject.GetProperty("U_MaxBoxSize"))/1024 : 0,
Password = accountObject.GetProperty("U_Password"),
ResponderEnabled = Convert.ToInt32((object) accountObject.GetProperty("U_Respond")) > 0,
QuotaUsed = Convert.ToInt64((object) accountObject.GetProperty("U_MailBoxSize")),
@ -923,7 +923,8 @@ namespace WebsitePanel.Providers.Mail
accountObject.SetProperty("U_AccountDisabled", mailbox.IceWarpAccountState);
accountObject.SetProperty("U_DomainAdmin", mailbox.IsDomainAdmin);
accountObject.SetProperty("U_Password", mailbox.Password);
accountObject.SetProperty("U_MaxBoxSize", mailbox.MaxMailboxSize);
accountObject.SetProperty("U_MaxBoxSize", mailbox.MaxMailboxSize*1024);
accountObject.SetProperty("U_MaxBox", mailbox.MaxMailboxSize > 0 ? "1" : "0");
accountObject.SetProperty("U_MaxMessageSize", mailbox.MaxMessageSizeMegaByte*1024);
accountObject.SetProperty("U_MegabyteSendLimit", mailbox.MegaByteSendLimit);
accountObject.SetProperty("U_NumberSendLimit", mailbox.NumberSendLimit);
@ -1035,7 +1036,7 @@ namespace WebsitePanel.Providers.Mail
{
var forwardTo = GetForwardToAddressFromAccountObject(accountObject);
var aliases = GetAliasListFromAccountObject(accountObject) as IEnumerable<string>;
aliasList.AddRange(aliases.Where(a => a != forwardTo).Select(alias => new MailAlias {Name = alias + "@" + domainName, ForwardTo = forwardTo + "@" + domainName}));
aliasList.AddRange(aliases.Where(a => a + "@" + domainName != forwardTo).Select(alias => new MailAlias {Name = alias + "@" + domainName, ForwardTo = forwardTo}));
}
accountObject.FindDone();

View file

@ -1,4 +1,4 @@
// Copyright (c) 2015, Outercurve Foundation.
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
@ -35,6 +35,7 @@ using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Runtime.Remoting;
using System.Text;
using System.Reflection;
using Microsoft.Win32;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Server.Utils;
@ -183,6 +184,35 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
#region RDS Collections
public List<string> GetRdsCollectionSessionHosts(string collectionName)
{
var result = new List<string>();
Runspace runspace = null;
try
{
runspace = OpenRunspace();
Command cmd = new Command("Get-RDSessionHost");
cmd.Parameters.Add("CollectionName", collectionName);
cmd.Parameters.Add("ConnectionBroker", ConnectionBroker);
object[] errors;
var hosts = ExecuteShellCommand(runspace, cmd, false, out errors);
foreach (var host in hosts)
{
result.Add(GetPSObjectProperty(host, "SessionHost").ToString());
}
}
finally
{
CloseRunspace(runspace);
}
return result;
}
public bool AddRdsServersToDeployment(RdsServer[] servers)
{
var result = true;
@ -222,6 +252,14 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
{
runSpace = OpenRunspace();
var existingServers = GetServersExistingInCollections(runSpace);
existingServers = existingServers.Select(x => x.ToUpper()).Intersect(collection.Servers.Select(x => x.FqdName.ToUpper())).ToList();
if (existingServers.Any())
{
throw new Exception(string.Format("Server{0} {1} already added to another collection", existingServers.Count == 1 ? "" : "s", string.Join(" ,", existingServers.ToArray())));
}
foreach (var server in collection.Servers)
{
//If server will restart it will not be added to collection
@ -250,6 +288,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
throw new Exception("Collection not created");
}
EditRdsCollectionSettingsInternal(collection, runSpace);
var orgPath = GetOrganizationPath(organizationId);
if (!ActiveDirectoryUtils.AdObjectExists(GetComputerGroupPath(organizationId, collection.Name)))
@ -302,6 +341,92 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
return result;
}
public void EditRdsCollectionSettings(RdsCollection collection)
{
Runspace runSpace = null;
try
{
runSpace = OpenRunspace();
if (collection.Settings != null)
{
var errors = EditRdsCollectionSettingsInternal(collection, runSpace);
if (errors.Count > 0)
{
throw new Exception(string.Format("Settings not setted:\r\n{0}", string.Join("r\\n\\", errors.ToArray())));
}
}
}
finally
{
CloseRunspace(runSpace);
}
}
public List<RdsUserSession> GetRdsUserSessions(string collectionName)
{
Runspace runSpace = null;
var result = new List<RdsUserSession>();
try
{
runSpace = OpenRunspace();
result = GetRdsUserSessionsInternal(collectionName, runSpace);
}
finally
{
CloseRunspace(runSpace);
}
return result;
}
public void LogOffRdsUser(string unifiedSessionId, string hostServer)
{
Runspace runSpace = null;
try
{
runSpace = OpenRunspace();
object[] errors;
Command cmd = new Command("Invoke-RDUserLogoff");
cmd.Parameters.Add("HostServer", hostServer);
cmd.Parameters.Add("UnifiedSessionID", unifiedSessionId);
cmd.Parameters.Add("Force", true);
ExecuteShellCommand(runSpace, cmd, false, out errors);
if (errors != null && errors.Length > 0)
{
throw new Exception(string.Join("r\\n\\", errors.Select(e => e.ToString()).ToArray()));
}
}
finally
{
CloseRunspace(runSpace);
}
}
public List<string> GetServersExistingInCollections()
{
Runspace runSpace = null;
List<string> existingServers = new List<string>();
try
{
runSpace = OpenRunspace();
existingServers = GetServersExistingInCollections(runSpace);
}
finally
{
CloseRunspace(runSpace);
}
return existingServers;
}
public RdsCollection GetCollection(string collectionName)
{
RdsCollection collection =null;
@ -646,6 +771,12 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
cmd.Parameters.Add("FilePath", remoteApp.FilePath);
cmd.Parameters.Add("ShowInWebAccess", remoteApp.ShowInWebAccess);
if (!string.IsNullOrEmpty(remoteApp.RequiredCommandLine))
{
cmd.Parameters.Add("CommandLineSetting", "Require");
cmd.Parameters.Add("RequiredCommandLine", remoteApp.RequiredCommandLine);
}
ExecuteShellCommand(runSpace, cmd, false);
result = true;
@ -769,6 +900,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
RemoveRdRap(runSpace, gatewayHost, policyName);
}
Log.WriteWarning(gatewayHost);
var userGroupParametr = string.Format("@({0})", string.Join(",", groups.Select(x => string.Format("\"{0}@{1}\"", x, RootDomain)).ToArray()));
var computerGroupParametr = string.Format("\"{0}@{1}\"", GetComputersGroupName(collectionName), RootDomain);
@ -778,8 +910,10 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
rdRapCommand.Parameters.Add("UserGroups", userGroupParametr);
rdRapCommand.Parameters.Add("ComputerGroupType", 1);
rdRapCommand.Parameters.Add("ComputerGroup", computerGroupParametr);
Log.WriteWarning("User Group:" + userGroupParametr);
Log.WriteWarning("Computer Group:" + computerGroupParametr);
ExecuteRemoteShellCommand(runSpace, gatewayHost, rdRapCommand, RdsModuleName);
Log.WriteWarning("RD RAP Added");
}
internal void RemoveRdRap(Runspace runSpace, string gatewayHost, string name)
@ -1058,6 +1192,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
ShowInWebAccess = Convert.ToBoolean(GetPSObjectProperty(psObject, "ShowInWebAccess"))
};
var requiredCommandLine = GetPSObjectProperty(psObject, "RequiredCommandLine");
remoteApp.RequiredCommandLine = requiredCommandLine == null ? null : requiredCommandLine.ToString();
return remoteApp;
}
@ -1097,7 +1234,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
private string GetPolicyName(string organizationId, string collectionName, RdsPolicyTypes policyType)
{
string policyName = string.Format("{0}-{1}-", organizationId, collectionName);
string policyName = string.Format("{0}-", collectionName);
switch (policyType)
{
@ -1380,6 +1517,23 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
return ExecuteShellCommand(runSpace, invokeCommand, false);
}
internal Collection<PSObject> ExecuteRemoteShellCommand(Runspace runSpace, string hostName, List<string> scripts, params string[] moduleImports)
{
Command invokeCommand = new Command("Invoke-Command");
invokeCommand.Parameters.Add("ComputerName", hostName);
RunspaceInvoke invoke = new RunspaceInvoke();
string commandString = moduleImports.Any() ? string.Format("import-module {0};", string.Join(",", moduleImports)) : string.Empty;
commandString = string.Format("{0};{1}", commandString, string.Join(";", scripts.ToArray()));
ScriptBlock sb = invoke.Invoke(string.Format("{{{0}}}", commandString))[0].BaseObject as ScriptBlock;
invokeCommand.Parameters.Add("ScriptBlock", sb);
return ExecuteShellCommand(runSpace, invokeCommand, false);
}
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd)
{
return ExecuteShellCommand(runSpace, cmd, true);
@ -1396,6 +1550,38 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
return ExecuteShellCommand(runSpace, cmd, true, out errors);
}
internal Collection<PSObject> ExecuteShellCommand(Runspace runspace, List<string> scripts, out object[] errors)
{
Log.WriteStart("ExecuteShellCommand");
var errorList = new List<object>();
Collection<PSObject> results;
using (Pipeline pipeLine = runspace.CreatePipeline())
{
foreach (string script in scripts)
{
pipeLine.Commands.AddScript(script);
}
results = pipeLine.Invoke();
if (pipeLine.Error != null && pipeLine.Error.Count > 0)
{
foreach (object item in pipeLine.Error.ReadToEnd())
{
errorList.Add(item);
string errorMessage = string.Format("Invoke error: {0}", item);
Log.WriteWarning(errorMessage);
}
}
}
errors = errorList.ToArray();
Log.WriteEnd("ExecuteShellCommand");
return results;
}
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController,
out object[] errors)
{
@ -1517,6 +1703,88 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
return result;
}
internal List<string> GetServersExistingInCollections(Runspace runSpace)
{
var existingHosts = new List<string>();
//var scripts = new List<string>();
//scripts.Add(string.Format("$sessions = Get-RDSessionCollection -ConnectionBroker {0}", ConnectionBroker));
//scripts.Add(string.Format("foreach($session in $sessions){{Get-RDSessionHost $session.CollectionName -ConnectionBroker {0}|Select SessionHost}}", ConnectionBroker));
//object[] errors;
//var sessionHosts = ExecuteShellCommand(runSpace, scripts, out errors);
//foreach(var host in sessionHosts)
//{
// var sessionHost = GetPSObjectProperty(host, "SessionHost");
// if (sessionHost != null)
// {
// existingHosts.Add(sessionHost.ToString());
// }
//}
return existingHosts;
}
internal List<string> EditRdsCollectionSettingsInternal(RdsCollection collection, Runspace runspace)
{
object[] errors;
Command cmd = new Command("Set-RDSessionCollectionConfiguration");
cmd.Parameters.Add("CollectionName", collection.Name);
cmd.Parameters.Add("ConnectionBroker", ConnectionBroker);
var properties = collection.Settings.GetType().GetProperties();
foreach(var prop in properties)
{
if (prop.Name.ToLower() != "id" && prop.Name.ToLower() != "rdscollectionid")
{
var value = prop.GetValue(collection.Settings, null);
if (value != null)
{
cmd.Parameters.Add(prop.Name, value);
}
}
}
ExecuteShellCommand(runspace, cmd, false, out errors);
if (errors != null)
{
return errors.Select(e => e.ToString()).ToList();
}
return new List<string>();
}
internal List<RdsUserSession> GetRdsUserSessionsInternal(string collectionName, Runspace runSpace)
{
var result = new List<RdsUserSession>();
var scripts = new List<string>();
scripts.Add(string.Format("Get-RDUserSession -ConnectionBroker {0} - CollectionName {1} | ft CollectionName, Username, UnifiedSessionId, SessionState, HostServer", ConnectionBroker, collectionName));
object[] errors;
Command cmd = new Command("Get-RDUserSession");
cmd.Parameters.Add("CollectionName", collectionName);
cmd.Parameters.Add("ConnectionBroker", ConnectionBroker);
var userSessions = ExecuteShellCommand(runSpace, cmd, false, out errors);
var properties = typeof(RdsUserSession).GetProperties();
foreach(var userSession in userSessions)
{
var session = new RdsUserSession();
foreach(var prop in properties)
{
prop.SetValue(session, GetPSObjectProperty(userSession, prop.Name).ToString(), null);
}
result.Add(session);
}
return result;
}
#endregion
}
}

View file

@ -45,7 +45,11 @@ namespace WebsitePanel.Providers.Web.Delegation
using (var srvman = new ServerManager())
{
var adminConfig = srvman.GetAdministrationConfiguration();
//
// return if system.webServer/management/delegation section is not exist in config file
if (!HasDelegationSection(adminConfig))
return;
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
//
var rulesCollection = delegationSection.GetCollection();
@ -103,7 +107,11 @@ namespace WebsitePanel.Providers.Web.Delegation
using (var srvman = new ServerManager())
{
var adminConfig = srvman.GetAdministrationConfiguration();
//
// return if system.webServer/management/delegation section is not exist in config file
if (!HasDelegationSection(adminConfig))
return;
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
//
var rulesCollection = delegationSection.GetCollection();
@ -142,7 +150,11 @@ namespace WebsitePanel.Providers.Web.Delegation
using (var srvman = new ServerManager())
{
var adminConfig = srvman.GetAdministrationConfiguration();
//
// return if system.webServer/management/delegation section is not exist in config file
if (!HasDelegationSection(adminConfig))
return false;
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
//
var rulesCollection = delegationSection.GetCollection();
@ -171,7 +183,11 @@ namespace WebsitePanel.Providers.Web.Delegation
using (var srvman = GetServerManager())
{
var adminConfig = srvman.GetAdministrationConfiguration();
//
// return if system.webServer/management/delegation section is not exist in config file
if (!HasDelegationSection(adminConfig))
return;
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
//
var rulesCollection = delegationSection.GetCollection();
@ -245,7 +261,11 @@ namespace WebsitePanel.Providers.Web.Delegation
using (var srvman = GetServerManager())
{
var adminConfig = srvman.GetAdministrationConfiguration();
//
// return if system.webServer/management/delegation section is not exist in config file
if (!HasDelegationSection(adminConfig))
return;
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
//
var rulesCollection = delegationSection.GetCollection();
@ -264,5 +284,21 @@ namespace WebsitePanel.Providers.Web.Delegation
}
}
}
private bool HasDelegationSection(Configuration adminConfig)
{
// try to get delegation section in config file (C:\Windows\system32\inetsrv\config\administration.config)
try
{
adminConfig.GetSection("system.webServer/management/delegation");
}
catch (Exception ex)
{
/* skip */
return false;
}
return true;
}
}
}

View file

@ -881,7 +881,7 @@ namespace WebsitePanel.Providers.Web
#endregion
#region PHP 5 script mappings
if (virtualDir.PhpInstalled.StartsWith(PHP_5))
if (!string.IsNullOrEmpty(virtualDir.PhpInstalled) && virtualDir.PhpInstalled.StartsWith(PHP_5))
{
if (PhpMode == Constants.PhpMode.FastCGI && virtualDir.PhpInstalled.Contains('|'))
{
@ -2072,7 +2072,7 @@ namespace WebsitePanel.Providers.Web
public new void GrantWebDeployPublishingAccess(string siteName, string accountName, string accountPassword)
{
// Web Publishing Access feature requires FullControl permissions on the web site's wwwroot folder
//GrantWebManagementAccessInternally(siteName, accountName, accountPassword, NTFSPermission.FullControl);
GrantWebManagementAccessInternally(siteName, accountName, accountPassword, NTFSPermission.FullControl);
//
EnforceDelegationRulesRestrictions(siteName, accountName);
}
@ -2086,7 +2086,7 @@ namespace WebsitePanel.Providers.Web
public new void RevokeWebDeployPublishingAccess(string siteName, string accountName)
{
// Web Publishing Access feature requires FullControl permissions on the web site's wwwroot folder
//RevokeWebManagementAccess(siteName, accountName);
RevokeWebManagementAccess(siteName, accountName);
//
RemoveDelegationRulesRestrictions(siteName, accountName);
}
@ -4133,6 +4133,9 @@ namespace WebsitePanel.Providers.Web
// Restore setting back
ServerSettings.ADEnabled = adEnabled;
}
//
RemoveDelegationRulesRestrictions(siteName, accountName);
}
private void ReadWebDeployPublishingAccessDetails(WebVirtualDirectory iisObject)
@ -4336,13 +4339,13 @@ namespace WebsitePanel.Providers.Web
protected string GetFullQualifiedAccountName(string accountName)
{
if (accountName.IndexOf("\\") != -1)
return accountName; // already has domain information
//
if (!ServerSettings.ADEnabled)
return String.Format(@"{0}\{1}", Environment.MachineName, accountName);
if (accountName.IndexOf("\\") != -1)
return accountName; // already has domain information
// DO IT FOR ACTIVE DIRECTORY MODE ONLY
string domainName = null;
try

View file

@ -1,31 +1,3 @@
// Copyright (c) 2015, 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.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
@ -59,6 +31,10 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
private System.Threading.SendOrPostCallback CreateCollectionOperationCompleted;
private System.Threading.SendOrPostCallback EditRdsCollectionSettingsOperationCompleted;
private System.Threading.SendOrPostCallback GetRdsUserSessionsOperationCompleted;
private System.Threading.SendOrPostCallback AddRdsServersToDeploymentOperationCompleted;
private System.Threading.SendOrPostCallback GetCollectionOperationCompleted;
@ -99,6 +75,12 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
private System.Threading.SendOrPostCallback CheckRDSServerAvaliableOperationCompleted;
private System.Threading.SendOrPostCallback GetServersExistingInCollectionsOperationCompleted;
private System.Threading.SendOrPostCallback LogOffRdsUserOperationCompleted;
private System.Threading.SendOrPostCallback GetRdsCollectionSessionHostsOperationCompleted;
/// <remarks/>
public RemoteDesktopServices() {
this.Url = "http://localhost:9003/RemoteDesktopServices.asmx";
@ -107,6 +89,12 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
/// <remarks/>
public event CreateCollectionCompletedEventHandler CreateCollectionCompleted;
/// <remarks/>
public event EditRdsCollectionSettingsCompletedEventHandler EditRdsCollectionSettingsCompleted;
/// <remarks/>
public event GetRdsUserSessionsCompletedEventHandler GetRdsUserSessionsCompleted;
/// <remarks/>
public event AddRdsServersToDeploymentCompletedEventHandler AddRdsServersToDeploymentCompleted;
@ -167,6 +155,15 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
/// <remarks/>
public event CheckRDSServerAvaliableCompletedEventHandler CheckRDSServerAvaliableCompleted;
/// <remarks/>
public event GetServersExistingInCollectionsCompletedEventHandler GetServersExistingInCollectionsCompleted;
/// <remarks/>
public event LogOffRdsUserCompletedEventHandler LogOffRdsUserCompleted;
/// <remarks/>
public event GetRdsCollectionSessionHostsCompletedEventHandler GetRdsCollectionSessionHostsCompleted;
/// <remarks/>
[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)]
@ -212,6 +209,88 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/EditRdsCollectionSettings", 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 EditRdsCollectionSettings(RdsCollection collection) {
this.Invoke("EditRdsCollectionSettings", new object[] {
collection});
}
/// <remarks/>
public System.IAsyncResult BeginEditRdsCollectionSettings(RdsCollection collection, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("EditRdsCollectionSettings", new object[] {
collection}, callback, asyncState);
}
/// <remarks/>
public void EndEditRdsCollectionSettings(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void EditRdsCollectionSettingsAsync(RdsCollection collection) {
this.EditRdsCollectionSettingsAsync(collection, null);
}
/// <remarks/>
public void EditRdsCollectionSettingsAsync(RdsCollection collection, object userState) {
if ((this.EditRdsCollectionSettingsOperationCompleted == null)) {
this.EditRdsCollectionSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEditRdsCollectionSettingsOperationCompleted);
}
this.InvokeAsync("EditRdsCollectionSettings", new object[] {
collection}, this.EditRdsCollectionSettingsOperationCompleted, userState);
}
private void OnEditRdsCollectionSettingsOperationCompleted(object arg) {
if ((this.EditRdsCollectionSettingsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.EditRdsCollectionSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetRdsUserSessions", 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 RdsUserSession[] GetRdsUserSessions(string collectionName) {
object[] results = this.Invoke("GetRdsUserSessions", new object[] {
collectionName});
return ((RdsUserSession[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetRdsUserSessions(string collectionName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetRdsUserSessions", new object[] {
collectionName}, callback, asyncState);
}
/// <remarks/>
public RdsUserSession[] EndGetRdsUserSessions(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((RdsUserSession[])(results[0]));
}
/// <remarks/>
public void GetRdsUserSessionsAsync(string collectionName) {
this.GetRdsUserSessionsAsync(collectionName, null);
}
/// <remarks/>
public void GetRdsUserSessionsAsync(string collectionName, object userState) {
if ((this.GetRdsUserSessionsOperationCompleted == null)) {
this.GetRdsUserSessionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsUserSessionsOperationCompleted);
}
this.InvokeAsync("GetRdsUserSessions", new object[] {
collectionName}, this.GetRdsUserSessionsOperationCompleted, userState);
}
private void OnGetRdsUserSessionsOperationCompleted(object arg) {
if ((this.GetRdsUserSessionsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetRdsUserSessionsCompleted(this, new GetRdsUserSessionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddRdsServersToDeployment", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@ -1096,6 +1175,130 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetServersExistingInCollections", 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 string[] GetServersExistingInCollections() {
object[] results = this.Invoke("GetServersExistingInCollections", new object[0]);
return ((string[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetServersExistingInCollections(System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetServersExistingInCollections", new object[0], callback, asyncState);
}
/// <remarks/>
public string[] EndGetServersExistingInCollections(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string[])(results[0]));
}
/// <remarks/>
public void GetServersExistingInCollectionsAsync() {
this.GetServersExistingInCollectionsAsync(null);
}
/// <remarks/>
public void GetServersExistingInCollectionsAsync(object userState) {
if ((this.GetServersExistingInCollectionsOperationCompleted == null)) {
this.GetServersExistingInCollectionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetServersExistingInCollectionsOperationCompleted);
}
this.InvokeAsync("GetServersExistingInCollections", new object[0], this.GetServersExistingInCollectionsOperationCompleted, userState);
}
private void OnGetServersExistingInCollectionsOperationCompleted(object arg) {
if ((this.GetServersExistingInCollectionsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetServersExistingInCollectionsCompleted(this, new GetServersExistingInCollectionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/LogOffRdsUser", 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 LogOffRdsUser(string unifiedSessionId, string hostServer) {
this.Invoke("LogOffRdsUser", new object[] {
unifiedSessionId,
hostServer});
}
/// <remarks/>
public System.IAsyncResult BeginLogOffRdsUser(string unifiedSessionId, string hostServer, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("LogOffRdsUser", new object[] {
unifiedSessionId,
hostServer}, callback, asyncState);
}
/// <remarks/>
public void EndLogOffRdsUser(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
/// <remarks/>
public void LogOffRdsUserAsync(string unifiedSessionId, string hostServer) {
this.LogOffRdsUserAsync(unifiedSessionId, hostServer, null);
}
/// <remarks/>
public void LogOffRdsUserAsync(string unifiedSessionId, string hostServer, object userState) {
if ((this.LogOffRdsUserOperationCompleted == null)) {
this.LogOffRdsUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnLogOffRdsUserOperationCompleted);
}
this.InvokeAsync("LogOffRdsUser", new object[] {
unifiedSessionId,
hostServer}, this.LogOffRdsUserOperationCompleted, userState);
}
private void OnLogOffRdsUserOperationCompleted(object arg) {
if ((this.LogOffRdsUserCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.LogOffRdsUserCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetRdsCollectionSessionHosts", 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 string[] GetRdsCollectionSessionHosts(string collectionName) {
object[] results = this.Invoke("GetRdsCollectionSessionHosts", new object[] {
collectionName});
return ((string[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetRdsCollectionSessionHosts(string collectionName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetRdsCollectionSessionHosts", new object[] {
collectionName}, callback, asyncState);
}
/// <remarks/>
public string[] EndGetRdsCollectionSessionHosts(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string[])(results[0]));
}
/// <remarks/>
public void GetRdsCollectionSessionHostsAsync(string collectionName) {
this.GetRdsCollectionSessionHostsAsync(collectionName, null);
}
/// <remarks/>
public void GetRdsCollectionSessionHostsAsync(string collectionName, object userState) {
if ((this.GetRdsCollectionSessionHostsOperationCompleted == null)) {
this.GetRdsCollectionSessionHostsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsCollectionSessionHostsOperationCompleted);
}
this.InvokeAsync("GetRdsCollectionSessionHosts", new object[] {
collectionName}, this.GetRdsCollectionSessionHostsOperationCompleted, userState);
}
private void OnGetRdsCollectionSessionHostsOperationCompleted(object arg) {
if ((this.GetRdsCollectionSessionHostsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetRdsCollectionSessionHostsCompleted(this, new GetRdsCollectionSessionHostsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
@ -1128,6 +1331,36 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void EditRdsCollectionSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetRdsUserSessionsCompletedEventHandler(object sender, GetRdsUserSessionsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetRdsUserSessionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetRdsUserSessionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public RdsUserSession[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((RdsUserSession[])(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void AddRdsServersToDeploymentCompletedEventHandler(object sender, AddRdsServersToDeploymentCompletedEventArgs e);
@ -1537,4 +1770,60 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetServersExistingInCollectionsCompletedEventHandler(object sender, GetServersExistingInCollectionsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetServersExistingInCollectionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetServersExistingInCollectionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public string[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((string[])(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void LogOffRdsUserCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetRdsCollectionSessionHostsCompletedEventHandler(object sender, GetRdsCollectionSessionHostsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetRdsCollectionSessionHostsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetRdsCollectionSessionHostsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public string[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((string[])(this.results[0]));
}
}
}
}

View file

@ -1,5 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Visual Studio 2013
VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Caching Application Block", "Caching Application Block", "{C8E6F2E4-A5B8-486A-A56E-92D864524682}"
ProjectSection(SolutionItems) = preProject
Bin\Microsoft.Practices.EnterpriseLibrary.Common.dll = Bin\Microsoft.Practices.EnterpriseLibrary.Common.dll

View file

@ -1271,6 +1271,28 @@ namespace WebsitePanel.Server
#endregion
#region Archiving
[WebMethod, SoapHeader("settings")]
public ResultObject ExportMailBox(string organizationId, string accountName, string storagePath)
{
ResultObject res = null;
try
{
LogStart("ExportMailBox");
res = ES.ExportMailBox(organizationId, accountName, storagePath);
LogEnd("ExportMailBox");
}
catch (Exception ex)
{
LogError("ExportMailBox", ex);
throw;
}
return res;
}
[WebMethod, SoapHeader("settings")]
public ResultObject SetMailBoxArchiving(string organizationId, string accountName, bool archive, long archiveQuotaKB, long archiveWarningQuotaKB, string RetentionPolicy)
{

View file

@ -99,6 +99,12 @@ namespace WebsitePanel.Server
return Organization.CreateUser(organizationId, loginName, displayName, upn, password, enabled);
}
[WebMethod, SoapHeader("settings")]
public void DisableUser(string loginName, string organizationId)
{
Organization.DisableUser(loginName, organizationId);
}
[WebMethod, SoapHeader("settings")]
public void DeleteUser(string loginName, string organizationId)
{

View file

@ -76,6 +76,40 @@ namespace WebsitePanel.Server
}
}
[WebMethod, SoapHeader("settings")]
public void EditRdsCollectionSettings(RdsCollection collection)
{
try
{
Log.WriteStart("'{0}' EditRdsCollectionSettings", ProviderSettings.ProviderName);
RDSProvider.EditRdsCollectionSettings(collection);
Log.WriteEnd("'{0}' EditRdsCollectionSettings", ProviderSettings.ProviderName);
}
catch (Exception ex)
{
Log.WriteError(String.Format("'{0}' EditRdsCollectionSettings", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")]
public List<RdsUserSession> GetRdsUserSessions(string collectionName)
{
try
{
Log.WriteStart("'{0}' GetRdsUserSessions", ProviderSettings.ProviderName);
var result = RDSProvider.GetRdsUserSessions(collectionName);
Log.WriteEnd("'{0}' GetRdsUserSessions", ProviderSettings.ProviderName);
return result;
}
catch (Exception ex)
{
Log.WriteError(String.Format("'{0}' GetRdsUserSessions", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")]
public bool AddRdsServersToDeployment(RdsServer[] servers)
{
@ -410,5 +444,56 @@ namespace WebsitePanel.Server
throw;
}
}
[WebMethod, SoapHeader("settings")]
public List<string> GetServersExistingInCollections()
{
try
{
Log.WriteStart("'{0}' GetServersExistingInCollections", ProviderSettings.ProviderName);
var result = RDSProvider.GetServersExistingInCollections();
Log.WriteEnd("'{0}' GetServersExistingInCollections", ProviderSettings.ProviderName);
return result;
}
catch (Exception ex)
{
Log.WriteError(String.Format("'{0}' GetServersExistingInCollections", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")]
public void LogOffRdsUser(string unifiedSessionId, string hostServer)
{
try
{
Log.WriteStart("'{0}' LogOffRdsUser", ProviderSettings.ProviderName);
RDSProvider.LogOffRdsUser(unifiedSessionId, hostServer);
Log.WriteEnd("'{0}' LogOffRdsUser", ProviderSettings.ProviderName);
}
catch (Exception ex)
{
Log.WriteError(String.Format("'{0}' LogOffRdsUser", ProviderSettings.ProviderName), ex);
throw;
}
}
[WebMethod, SoapHeader("settings")]
public List<string> GetRdsCollectionSessionHosts(string collectionName)
{
try
{
Log.WriteStart("'{0}' GetRdsCollectionSessionHosts", ProviderSettings.ProviderName);
var result = RDSProvider.GetRdsCollectionSessionHosts(collectionName);
Log.WriteEnd("'{0}' GetRdsCollectionSessionHosts", ProviderSettings.ProviderName);
return result;
}
catch(Exception ex)
{
Log.WriteError(String.Format("'{0}' GetRdsCollectionSessionHosts", ProviderSettings.ProviderName), ex);
throw;
}
}
}
}

View file

@ -1,7 +1,7 @@
using System.Configuration;
using WebsitePanel.WebDavPortal.WebConfigSections;
namespace WebsitePanel.WebDavPortal.Config.Entities
namespace WebsitePanel.WebDav.Core.Config.Entities
{
public abstract class AbstractConfigCollection
{

View file

@ -1,14 +1,19 @@
namespace WebsitePanel.WebDavPortal.Config.Entities
using System.Collections.Generic;
using System.Linq;
namespace WebsitePanel.WebDav.Core.Config.Entities
{
public class ElementsRendering : AbstractConfigCollection
{
public int DefaultCount { get; private set; }
public int AddElementsCount { get; private set; }
public List<string> ElementsToIgnore { get; private set; }
public ElementsRendering()
{
DefaultCount = ConfigSection.ElementsRendering.DefaultCount;
AddElementsCount = ConfigSection.ElementsRendering.AddElementsCount;
ElementsToIgnore = ConfigSection.ElementsRendering.ElementsToIgnore.Split(',').ToList();
}
}
}

View file

@ -1,9 +1,9 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using WebsitePanel.WebDavPortal.WebConfigSections;
using WebsitePanel.WebDav.Core.Config.WebConfigSections;
namespace WebsitePanel.WebDavPortal.Config.Entities
namespace WebsitePanel.WebDav.Core.Config.Entities
{
public class FileIconsDictionary : AbstractConfigCollection, IReadOnlyDictionary<string, string>
{

View file

@ -1,7 +1,6 @@
using System.Globalization;
using Resources.Resource;
namespace WebsitePanel.WebDavPortal.Config.Entities
namespace WebsitePanel.WebDav.Core.Config.Entities
{
public class HttpErrorsCollection
{
@ -9,14 +8,14 @@ namespace WebsitePanel.WebDavPortal.Config.Entities
{
get
{
var message = errors.ResourceManager.GetString("_" + statusCode.ToString(CultureInfo.InvariantCulture));
var message = Resources.HttpErrors.ResourceManager.GetString("_" + statusCode.ToString(CultureInfo.InvariantCulture));
return message ?? Default;
}
}
public string Default
{
get { return errors.Default; }
get { return Resources.HttpErrors.Default; }
}
}
}

View file

@ -3,23 +3,23 @@ using System.Collections.Generic;
using System.Linq;
using WebsitePanel.WebDavPortal.WebConfigSections;
namespace WebsitePanel.WebDavPortal.Config.Entities
namespace WebsitePanel.WebDav.Core.Config.Entities
{
public class OfficeOnlineCollection : AbstractConfigCollection, IReadOnlyCollection<string>
public class OfficeOnlineCollection : AbstractConfigCollection, IReadOnlyCollection<OfficeOnlineElement>
{
private readonly IList<string> _officeExtensions;
private readonly IList<OfficeOnlineElement> _officeExtensions;
public OfficeOnlineCollection()
{
IsEnabled = ConfigSection.OfficeOnline.IsEnabled;
Url = ConfigSection.OfficeOnline.Url;
_officeExtensions = ConfigSection.OfficeOnline.Cast<OfficeOnlineElement>().Select(x => x.Extension).ToList();
_officeExtensions = ConfigSection.OfficeOnline.Cast<OfficeOnlineElement>().ToList();
}
public bool IsEnabled { get; private set; }
public string Url { get; private set; }
public IEnumerator<string> GetEnumerator()
public IEnumerator<OfficeOnlineElement> GetEnumerator()
{
return _officeExtensions.GetEnumerator();
}
@ -36,7 +36,7 @@ namespace WebsitePanel.WebDavPortal.Config.Entities
public bool Contains(string extension)
{
return _officeExtensions.Contains(extension);
return _officeExtensions.Any(x=>x.Extension == extension);
}
}
}

View file

@ -1,9 +1,10 @@
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
using WebsitePanel.WebDav.Core.Config.WebConfigSections;
using WebsitePanel.WebDavPortal.WebConfigSections;
namespace WebsitePanel.WebDavPortal.Config.Entities
namespace WebsitePanel.WebDav.Core.Config.Entities
{
public class SessionKeysCollection : AbstractConfigCollection
{
@ -14,12 +15,12 @@ namespace WebsitePanel.WebDavPortal.Config.Entities
_sessionKeys = ConfigSection.SessionKeys.Cast<SessionKeysElement>();
}
public string AccountInfo
public string AuthTicket
{
get
{
SessionKeysElement sessionKey =
_sessionKeys.FirstOrDefault(x => x.Key == SessionKeysElement.AccountInfoKey);
_sessionKeys.FirstOrDefault(x => x.Key == SessionKeysElement.AuthTicketKey);
return sessionKey != null ? sessionKey.Value : null;
}
}
@ -34,6 +35,26 @@ namespace WebsitePanel.WebDavPortal.Config.Entities
}
}
public string UserGroupsKey
{
get
{
SessionKeysElement sessionKey =
_sessionKeys.FirstOrDefault(x => x.Key == SessionKeysElement.UserGroupsKey);
return sessionKey != null ? sessionKey.Value : null;
}
}
public string WebDavRootFoldersPermissions
{
get
{
SessionKeysElement sessionKey =
_sessionKeys.FirstOrDefault(x => x.Key == SessionKeysElement.WebDavRootFolderPermissionsKey);
return sessionKey != null ? sessionKey.Value : null;
}
}
public string ResourseRenderCount
{
get

View file

@ -1,4 +1,4 @@
namespace WebsitePanel.WebDavPortal.Config.Entities
namespace WebsitePanel.WebDav.Core.Config.Entities
{
public class WebsitePanelConstantUserParameters : AbstractConfigCollection
{

View file

@ -1,6 +1,6 @@
using WebsitePanel.WebDavPortal.Config.Entities;
using WebsitePanel.WebDav.Core.Config.Entities;
namespace WebsitePanel.WebDavPortal.Config
namespace WebsitePanel.WebDav.Core.Config
{
public interface IWebDavAppConfig
{

View file

@ -1,6 +1,6 @@
using System.Configuration;
namespace WebsitePanel.WebDavPortal.WebConfigSections
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
{
public class ApplicationNameElement : ConfigurationElement
{

View file

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
{
public class AuthTimeoutCookieNameElement : ConfigurationElement
{
private const string ValueKey = "value";
[ConfigurationProperty(ValueKey, IsKey = true, IsRequired = true)]
public string Value
{
get { return (string)this[ValueKey]; }
set { this[ValueKey] = value; }
}
}
}

View file

@ -1,11 +1,12 @@
using System.Configuration;
namespace WebsitePanel.WebDavPortal.WebConfigSections
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
{
public class ElementsRenderingElement : ConfigurationElement
{
private const string DefaultCountKey = "defaultCount";
private const string AddElementsCountKey = "addElementsCount";
private const string ElementsToIgnoreKey = "elementsToIgnoreKey";
[ConfigurationProperty(DefaultCountKey, IsKey = true, IsRequired = true, DefaultValue = 30)]
public int DefaultCount
@ -20,5 +21,12 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
get { return (int)this[AddElementsCountKey]; }
set { this[AddElementsCountKey] = value; }
}
[ConfigurationProperty(ElementsToIgnoreKey, IsKey = true, IsRequired = true, DefaultValue = "")]
public string ElementsToIgnore
{
get { return (string)this[ElementsToIgnoreKey]; }
set { this[ElementsToIgnoreKey] = value; }
}
}
}

View file

@ -1,6 +1,6 @@
using System.Configuration;
namespace WebsitePanel.WebDavPortal.WebConfigSections
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
{
public class FileIconsElement : ConfigurationElement
{

View file

@ -1,6 +1,6 @@
using System.Configuration;
namespace WebsitePanel.WebDavPortal.WebConfigSections
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
{
[ConfigurationCollection(typeof (FileIconsElement))]
public class FileIconsElementCollection : ConfigurationElementCollection

View file

@ -5,6 +5,7 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
public class OfficeOnlineElement : ConfigurationElement
{
private const string ExtensionKey = "extension";
private const string OwaOpenerKey = "owaOpener";
[ConfigurationProperty(ExtensionKey, IsKey = true, IsRequired = true)]
public string Extension
@ -12,5 +13,12 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
get { return this[ExtensionKey].ToString(); }
set { this[ExtensionKey] = value; }
}
[ConfigurationProperty(OwaOpenerKey, IsKey = true, IsRequired = true)]
public string OwaOpener
{
get { return this[OwaOpenerKey].ToString(); }
set { this[OwaOpenerKey] = value; }
}
}
}

View file

@ -1,6 +1,6 @@
using System.Configuration;
namespace WebsitePanel.WebDavPortal.WebConfigSections
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
{
public class SessionKeysElement : ConfigurationElement
{
@ -8,7 +8,10 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
private const string ValueKey = "value";
public const string AccountInfoKey = "AccountInfoSessionKey";
public const string AuthTicketKey = "AuthTicketKey";
public const string WebDavManagerKey = "WebDavManagerSessionKey";
public const string UserGroupsKey = "UserGroupsKey";
public const string WebDavRootFolderPermissionsKey = "WebDavRootFolderPermissionsKey";
public const string ResourseRenderCountKey = "ResourseRenderCountSessionKey";
public const string ItemIdSessionKey = "ItemId";

View file

@ -1,6 +1,7 @@
using System.Configuration;
using WebsitePanel.WebDavPortal.WebConfigSections;
namespace WebsitePanel.WebDavPortal.WebConfigSections
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
{
[ConfigurationCollection(typeof (SessionKeysElement))]
public class SessionKeysElementCollection : ConfigurationElementCollection

View file

@ -1,6 +1,6 @@
using System.Configuration;
namespace WebsitePanel.WebDavPortal.WebConfigSections
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
{
public class UserDomainElement : ConfigurationElement
{

View file

@ -1,10 +1,13 @@
using System.Configuration;
using WebsitePanel.WebDav.Core.Config.WebConfigSections;
namespace WebsitePanel.WebDavPortal.WebConfigSections
{
public class WebDavExplorerConfigurationSettingsSection : ConfigurationSection
{
private const string UserDomainKey = "userDomain";
private const string WebdavRootKey = "webdavRoot";
private const string AuthTimeoutCookieNameKey = "authTimeoutCookieName";
private const string AppName = "applicationName";
private const string WebsitePanelConstantUserKey = "websitePanelConstantUser";
private const string ElementsRenderingKey = "elementsRendering";
@ -16,6 +19,20 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
public const string SectionName = "webDavExplorerConfigurationSettings";
[ConfigurationProperty(AuthTimeoutCookieNameKey, IsRequired = true)]
public AuthTimeoutCookieNameElement AuthTimeoutCookieName
{
get { return (AuthTimeoutCookieNameElement)this[AuthTimeoutCookieNameKey]; }
set { this[AuthTimeoutCookieNameKey] = value; }
}
[ConfigurationProperty(WebdavRootKey, IsRequired = true)]
public WebdavRootElement WebdavRoot
{
get { return (WebdavRootElement)this[WebdavRootKey]; }
set { this[WebdavRootKey] = value; }
}
[ConfigurationProperty(UserDomainKey, IsRequired = true)]
public UserDomainElement UserDomain
{

View file

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
{
public class WebdavRootElement : ConfigurationElement
{
private const string ValueKey = "value";
[ConfigurationProperty(ValueKey, IsKey = true, IsRequired = true)]
public string Value
{
get { return (string)this[ValueKey]; }
set { this[ValueKey] = value; }
}
}
}

View file

@ -1,6 +1,6 @@
using System.Configuration;
namespace WebsitePanel.WebDavPortal.WebConfigSections
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
{
public class WebsitePanelConstantUserElement : ConfigurationElement
{

View file

@ -1,8 +1,8 @@
using System.Configuration;
using WebsitePanel.WebDavPortal.Config.Entities;
using WebsitePanel.WebDav.Core.Config.Entities;
using WebsitePanel.WebDavPortal.WebConfigSections;
namespace WebsitePanel.WebDavPortal.Config
namespace WebsitePanel.WebDav.Core.Config
{
public class WebDavAppConfigManager : IWebDavAppConfig
{
@ -30,11 +30,21 @@ namespace WebsitePanel.WebDavPortal.Config
get { return _configSection.UserDomain.Value; }
}
public string WebdavRoot
{
get { return _configSection.WebdavRoot.Value; }
}
public string ApplicationName
{
get { return _configSection.ApplicationName.Value; }
}
public string AuthTimeoutCookieName
{
get { return _configSection.AuthTimeoutCookieName.Value; }
}
public ElementsRendering ElementsRendering { get; private set; }
public WebsitePanelConstantUserParameters WebsitePanelConstantUserParameters { get; private set; }
public SessionKeysCollection SessionKeys { get; private set; }

View file

@ -0,0 +1,124 @@
using System.Runtime.Serialization;
namespace WebsitePanel.WebDav.Core.Entities.Owa
{
[DataContract]
public class CheckFileInfo
{
[DataMember]
public string BaseFileName { get; set; }
[DataMember]
public string OwnerId { get; set; }
[DataMember]
public long Size { get; set; }
[DataMember]
public string Version { get; set; }
//[DataMember]
//public string SHA256 { get; set; }
//[DataMember]
//public bool AllowExternalMarketplace { get; set; }
//[DataMember]
//public string BreadcrumbBrandName { get; set; }
//[DataMember]
//public string BreadcrumbBrandUrl { get; set; }
//[DataMember]
//public string BreadcrumbDocName { get; set; }
//[DataMember]
//public string BreadcrumbDocUrl { get; set; }
//[DataMember]
//public string BreadcrumbFolderName { get; set; }
//[DataMember]
//public string BreadcrumbFolderUrl { get; set; }
//[DataMember]
//public string ClientUrl { get; set; }
//[DataMember]
//public bool CloseButtonClosesWindow { get; set; }
//[DataMember]
//public string CloseUrl { get; set; }
//[DataMember]
//public bool DisableBrowserCachingOfUserContent { get; set; }
//[DataMember]
//public bool DisablePrint { get; set; }
//[DataMember]
//public bool DisableTranslation { get; set; }
//[DataMember]
//public string DownloadUrl { get; set; }
//[DataMember]
//public string FileSharingUrl { get; set; }
//[DataMember]
//public string FileUrl { get; set; }
//[DataMember]
//public string HostAuthenticationId { get; set; }
//[DataMember]
//public string HostEditUrl { get; set; }
//[DataMember]
//public string HostEmbeddedEditUrl { get; set; }
//[DataMember]
//public string HostEmbeddedViewUrl { get; set; }
//[DataMember]
//public string HostName { get; set; }
//[DataMember]
//public string HostNotes { get; set; }
//[DataMember]
//public string HostRestUrl { get; set; }
//[DataMember]
//public string HostViewUrl { get; set; }
//[DataMember]
//public string IrmPolicyDescription { get; set; }
//[DataMember]
//public string IrmPolicyTitle { get; set; }
//[DataMember]
//public string PresenceProvider { get; set; }
//[DataMember]
//public string PresenceUserId { get; set; }
//[DataMember]
//public string PrivacyUrl { get; set; }
//[DataMember]
//public bool ProtectInClient { get; set; }
//[DataMember]
//public bool ReadOnly { get; set; }
//[DataMember]
//public bool RestrictedWebViewOnly { get; set; }
//[DataMember]
//public string SignoutUrl { get; set; }
//[DataMember]
//public bool SupportsCoauth { get; set; }
//[DataMember]
//public bool SupportsCobalt { get; set; }
//[DataMember]
//public bool SupportsFolders { get; set; }
//[DataMember]
//public bool SupportsLocks { get; set; }
//[DataMember]
//public bool SupportsScenarioLinks { get; set; }
//[DataMember]
//public bool SupportsSecureStore { get; set; }
//[DataMember]
//public bool SupportsUpdate { get; set; }
//[DataMember]
//public string TenantId { get; set; }
//[DataMember]
//public string TermsOfUseUrl { get; set; }
//[DataMember]
//public string TimeZone { get; set; }
//[DataMember]
//public bool UserCanAttend { get; set; }
//[DataMember]
//public bool UserCanNotWriteRelative { get; set; }
//[DataMember]
//public bool UserCanPresent { get; set; }
//[DataMember]
//public bool UserCanWrite { get; set; }
//[DataMember]
//public string UserFriendlyName { get; set; }
//[DataMember]
//public string UserId { get; set; }
//[DataMember]
//public bool WebEditingDisabled { get; set; }
}
}

View file

@ -1,7 +1,7 @@
using System;
using System.Runtime.Serialization;
namespace WebsitePanel.WebDavPortal.Exceptions
namespace WebsitePanel.WebDav.Core.Exceptions
{
[Serializable]
public class ConnectToWebDavServerException : Exception

View file

@ -1,7 +1,7 @@
using System;
using System.Runtime.Serialization;
namespace WebsitePanel.WebDavPortal.Exceptions
namespace WebsitePanel.WebDav.Core.Exceptions
{
[Serializable]
public class ResourceNotFoundException : Exception

View file

@ -4,5 +4,19 @@ namespace WebsitePanel.WebDav.Core.Exceptions
{
public class WebDavException : Exception
{
public WebDavException()
: base() { }
public WebDavException(string message)
: base(message) { }
public WebDavException(string format, params object[] args)
: base(string.Format(format, args)) { }
public WebDavException(string message, Exception innerException)
: base(message, innerException) { }
public WebDavException(string format, Exception innerException, params object[] args)
: base(string.Format(format, args), innerException) { }
}
}

View file

@ -0,0 +1,13 @@
using System;
using System.Linq;
namespace WebsitePanel.WebDav.Core.Extensions
{
static class UriExtensions
{
public static Uri Append(this Uri uri, params string[] paths)
{
return new Uri(paths.Aggregate(uri.AbsoluteUri, (current, path) => string.Format("{0}/{1}", current.TrimEnd('/'), path.TrimStart('/'))));
}
}
}

View file

@ -1,4 +1,5 @@
using System;
using System.DirectoryServices.AccountManagement;
using System.IO;
using System.Linq;
using System.Net;
@ -6,6 +7,7 @@ using System.Net.Security;
using System.Text;
using System.Text.RegularExpressions;
using System.Xml;
using WebsitePanel.WebDav.Core.Config;
using WebsitePanel.WebDav.Core.Exceptions;
namespace WebsitePanel.WebDav.Core
@ -18,6 +20,7 @@ namespace WebsitePanel.WebDav.Core
IFolder CreateFolder(string name);
IHierarchyItem[] GetChildren();
IResource GetResource(string name);
Uri Path { get; }
}
public class WebDavFolder : WebDavHierarchyItem, IFolder
@ -25,6 +28,8 @@ namespace WebsitePanel.WebDav.Core
private IHierarchyItem[] _children = new IHierarchyItem[0];
private Uri _path;
public Uri Path { get { return _path; } }
/// <summary>
/// The constructor
/// </summary>
@ -143,7 +148,7 @@ namespace WebsitePanel.WebDav.Core
public IResource GetResource(string name)
{
IHierarchyItem item =
_children.Single(i => i.ItemType == ItemType.Resource && i.DisplayName.Trim('/') == name.Trim('/'));
_children.Single(i => i.DisplayName.Trim('/') == name.Trim('/'));
var resource = new WebDavResource();
resource.SetCredentials(_credentials);
resource.SetHierarchyItem(item);
@ -155,7 +160,7 @@ namespace WebsitePanel.WebDav.Core
/// </summary>
public void Open()
{
var request = (HttpWebRequest) WebRequest.Create(_path);
var request = (HttpWebRequest)WebRequest.Create(_path);
request.PreAuthenticate = true;
request.Method = "PROPFIND";
request.ContentType = "application/xml";
@ -163,10 +168,10 @@ namespace WebsitePanel.WebDav.Core
//TODO Disable SSL
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; });
var credentials = (NetworkCredential) _credentials;
var credentials = (NetworkCredential)_credentials;
if (credentials != null && credentials.UserName != null)
{
request.Credentials = credentials;
//request.Credentials = credentials;
string auth = "Basic " +
Convert.ToBase64String(
Encoding.Default.GetBytes(credentials.UserName + ":" + credentials.Password));

View file

@ -17,8 +17,9 @@ namespace WebsitePanel.WebDav.Core
DateTime CreationDate { get; }
string CreatorDisplayName { get; }
string DisplayName { get; }
bool IsRootItem { get; set; }
Uri Href { get; }
ItemType ItemType { get; }
ItemType ItemType { get;}
DateTime LastModified { get; }
Property[] Properties { get; }
@ -59,7 +60,10 @@ namespace WebsitePanel.WebDav.Core
{
get
{
string displayName = _href.AbsoluteUri.Replace(_baseUri.AbsoluteUri, "");
var href = HttpUtility.UrlDecode(_href.AbsoluteUri);
var baseUri = HttpUtility.UrlDecode(_baseUri.AbsoluteUri);
string displayName = href.Replace(baseUri, "");
displayName = Regex.Replace(displayName, "\\/$", "");
Match displayNameMatch = Regex.Match(displayName, "([\\/]+)$");
if (displayNameMatch.Success)
@ -70,6 +74,8 @@ namespace WebsitePanel.WebDav.Core
}
}
public bool IsRootItem { get; set; }
public Uri Href
{
get { return _href; }

View file

@ -7,6 +7,7 @@ namespace WebsitePanel.WebDav.Core
public interface IItemContent
{
long ContentLength { get; }
long AllocatedSpace { get; set; }
string ContentType { get; }
void Download(string filename);

View file

@ -64,6 +64,7 @@ namespace WebsitePanel.WebDav.Core
public long ContentLength
{
get { return _contentLength; }
set { _contentLength = value; }
}
public string ContentType
@ -110,6 +111,23 @@ namespace WebsitePanel.WebDav.Core
webClient.UploadFile(Href, "PUT", filename);
}
/// <summary>
/// Uploads content of a file specified by filename to the server
/// </summary>
/// <param name="data">Posted file data to be uploaded</param>
public void Upload(byte[] data)
{
var credentials = (NetworkCredential)_credentials;
string auth = "Basic " +
Convert.ToBase64String(
Encoding.Default.GetBytes(credentials.UserName + ":" + credentials.Password));
var webClient = new WebClient();
webClient.Credentials = credentials;
webClient.Headers.Add("Authorization", auth);
webClient.UploadData(Href, "PUT", data);
}
/// <summary>
/// Loads content of the resource from WebDAV server.
/// </summary>
@ -233,14 +251,19 @@ namespace WebsitePanel.WebDav.Core
}
}
public long AllocatedSpace { get; set; }
public bool IsRootItem { get; set; }
public Uri Href
{
get { return _href; }
set { SetHref(value.ToString(), new Uri(value.Scheme + "://" + value.Host + value.Segments[0] + value.Segments[1])); }
}
public ItemType ItemType
{
get { return _itemType; }
set { _itemType = value; }
}
public DateTime LastModified
@ -405,6 +428,15 @@ namespace WebsitePanel.WebDav.Core
_lastModified = lastModified;
}
/// <summary>
/// For internal use only.
/// </summary>
/// <param name="comment"></param>
public void SetItemType(ItemType type)
{
_itemType = type;
}
/// <summary>
/// For internal use only.
/// </summary>
@ -518,6 +550,7 @@ namespace WebsitePanel.WebDav.Core
SetHref(item.Href);
SetLastModified(item.LastModified);
SetProperties(item.Properties);
SetItemType(item.ItemType);
}
}
}

View file

@ -0,0 +1,14 @@
using System;
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
using WebsitePanel.WebDav.Core.Security.Authentication.Principals;
namespace WebsitePanel.WebDav.Core.Interfaces.Managers
{
public interface IAccessTokenManager
{
WebDavAccessToken CreateToken(WspPrincipal principal, string filePath);
WebDavAccessToken GetToken(int id);
WebDavAccessToken GetToken(Guid guid);
void ClearExpiredTokens();
}
}

View file

@ -0,0 +1,17 @@
using System.Collections.Generic;
using System.Web;
using WebsitePanel.WebDav.Core.Client;
namespace WebsitePanel.WebDav.Core.Interfaces.Managers
{
public interface IWebDavManager
{
IEnumerable<IHierarchyItem> OpenFolder(string path);
bool IsFile(string path);
byte[] GetFileBytes(string path);
void UploadFile(string path, HttpPostedFileBase file);
IResource GetResource(string path);
string GetFileUrl(string path);
void DeleteResource(string path);
}
}

View file

@ -0,0 +1,12 @@
using System.Web.Mvc;
using WebsitePanel.WebDav.Core.Client;
using WebsitePanel.WebDav.Core.Entities.Owa;
namespace WebsitePanel.WebDav.Core.Interfaces.Owa
{
public interface IWopiServer
{
CheckFileInfo GetCheckFileInfo(string path);
FileResult GetFile(string path);
}
}

View file

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Security;
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
using WebsitePanel.WebDav.Core.Security.Authentication.Principals;
namespace WebsitePanel.WebDav.Core.Interfaces.Security
{
public interface IAuthenticationService
{
WspPrincipal LogIn(string login, string password);
void CreateAuthenticationTicket(WspPrincipal principal);
void LogOut();
}
}

Some files were not shown because too many files have changed in this diff Show more