Merge commit

This commit is contained in:
robvde 2015-02-06 06:46:08 +08:00
commit 71ea83b859
306 changed files with 20481 additions and 7981 deletions

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.
@ -42,7 +14,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Outercurve Foundation")]
[assembly: AssemblyCopyright("Copyright © 2012 Outercurve Foundation.")]
[assembly: AssemblyCopyright("Copyright © 2014 Outercurve Foundation.")]
[assembly: AssemblyVersion("2.1.0.1")]
[assembly: AssemblyFileVersion("2.1.0.1")]
[assembly: AssemblyInformationalVersion("2.1.0")]

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.
@ -15,9 +15,9 @@ Imports System
Imports System.Reflection
Imports System.Runtime.CompilerServices
Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Outercurve Foundation"), _
Assembly: AssemblyCopyright("Copyright © 2014 Outercurve Foundation."), _
Assembly: AssemblyVersion("2.1.0.1"), _
Assembly: AssemblyFileVersion("2.1.0.1"), _
<Assembly: AssemblyCompany("Outercurve Foundation"), _
Assembly: AssemblyCopyright("Copyright © 2014 Outercurve Foundation."), _
Assembly: AssemblyVersion("2.1.0.1"), _
Assembly: AssemblyFileVersion("2.1.0.1"), _
Assembly: AssemblyInformationalVersion("2.1.0")>

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,7 +43,8 @@ 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";
public const string FEED_ULS_KEY = "FeedUrls";

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) {
@ -2743,7 +2764,7 @@ namespace WebsitePanel.EnterpriseServer {
bool createFtpAccount,
string ftpAccountName,
bool createMailAccount,
string hostName,
string hostName,
bool createZoneRecord) {
object[] results = this.Invoke("CreateUserWizard", new object[] {
parentPackageId,
@ -2791,8 +2812,8 @@ namespace WebsitePanel.EnterpriseServer {
bool createFtpAccount,
string ftpAccountName,
bool createMailAccount,
string hostName,
bool createZoneRecord,
string hostName,
bool createZoneRecord,
System.AsyncCallback callback,
object asyncState) {
return this.BeginInvoke("CreateUserWizard", new object[] {
@ -2846,7 +2867,7 @@ namespace WebsitePanel.EnterpriseServer {
bool createFtpAccount,
string ftpAccountName,
bool createMailAccount,
string hostName,
string hostName,
bool createZoneRecord) {
this.CreateUserWizardAsync(parentPackageId, username, password, roleId, firstName, lastName, email, secondaryEmail, htmlMail, sendAccountLetter, createPackage, planId, sendPackageLetter, domainName, tempDomain, createWebSite, createFtpAccount, ftpAccountName, createMailAccount, hostName, createZoneRecord, null);
}
@ -2872,8 +2893,8 @@ namespace WebsitePanel.EnterpriseServer {
bool createFtpAccount,
string ftpAccountName,
bool createMailAccount,
string hostName,
bool createZoneRecord,
string hostName,
bool createZoneRecord,
object userState) {
if ((this.CreateUserWizardOperationCompleted == null)) {
this.CreateUserWizardOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateUserWizardOperationCompleted);
@ -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) {
@ -1544,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) {
@ -1641,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);
@ -1673,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);
@ -1717,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]));
}
}
}
@ -1751,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);
@ -2401,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);
@ -2452,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);
@ -2860,8 +2861,8 @@ namespace WebsitePanel.EnterpriseServer
public static void UpdateExchangeMailboxPlan(int mailboxPlanID, string mailboxPlan, bool enableActiveSync, bool enableIMAP, bool enableMAPI, bool enableOWA, bool enablePOP,
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 enabledLitigationHold, long recoverabelItemsSpace, long recoverabelItemsWarning, string litigationHoldUrl, string litigationHoldMsg,
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,6 +103,11 @@ namespace WebsitePanel.EnterpriseServer
return GetRdsServersPagedInternal(filterColumn, filterValue, sortColumn, startRow, maximumRows);
}
public static List<RdsUserSession> GetRdsUserSessions(int collectionId)
{
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);
@ -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");
@ -264,17 +308,43 @@ namespace WebsitePanel.EnterpriseServer
// load organization
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);
rds.CreateCollection(org.OrganizationId, collection);
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
};
collection.Id = DataProvider.AddRDSCollection(itemId, collection.Name, collection.Description);
rds.CreateCollection(org.OrganizationId, collection);
collection.Id = DataProvider.AddRDSCollection(itemId, collection.Name, collection.Description, collection.DisplayName);
collection.Settings.RdsCollectionId = collection.Id;
int settingsId = DataProvider.AddRdsCollectionSettings(collection.Settings);
collection.Settings.Id = settingsId;
foreach (var server in collection.Servers)
{
@ -282,8 +352,7 @@ 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,6 +594,22 @@ namespace WebsitePanel.EnterpriseServer
return result;
}
private static List<RdsUserSession> GetRdsUserSessionsInternal(int collectionId)
{
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();
@ -502,6 +635,23 @@ namespace WebsitePanel.EnterpriseServer
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);
@ -592,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)
{
@ -952,7 +1111,7 @@ namespace WebsitePanel.EnterpriseServer
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
var collection = GetRdsCollection(collectionId);
result.AddRange(rds.GetApplicationUsers(collection.Name, remoteApp.DisplayName));
result.AddRange(rds.GetApplicationUsers(collection.Name, remoteApp.Alias));
return result;
}
@ -971,7 +1130,7 @@ namespace WebsitePanel.EnterpriseServer
return result;
}
var collection = GetRdsCollection(collectionId);
var collection = ObjectUtils.FillObjectFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionById(collectionId));
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
rds.SetApplicationUsers(collection.Name, remoteApp, users.ToArray());
}
@ -994,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");
@ -1017,7 +1214,6 @@ namespace WebsitePanel.EnterpriseServer
}
remoteApp.ShowInWebAccess = true;
rds.AddRemoteApplication(collection.Name, remoteApp);
}
catch (Exception ex)
@ -1122,13 +1318,14 @@ namespace WebsitePanel.EnterpriseServer
}
List<RemoteApplication> existingCollectionApps = GetCollectionRemoteApplications(itemId, collection.Name);
List<RemoteApplication> remoteAppsToAdd = remoteApps.Where(x => !existingCollectionApps.Select(p => p.DisplayName).Contains(x.DisplayName)).ToList();
List<RemoteApplication> remoteAppsToAdd = remoteApps.Where(x => !existingCollectionApps.Select(p => p.Alias).Contains(x.Alias)).ToList();
foreach (var app in remoteAppsToAdd)
{
app.ShowInWebAccess = true;
AddRemoteApplicationToCollection(itemId, collection, app);
}
List<RemoteApplication> remoteAppsToRemove = existingCollectionApps.Where(x => !remoteApps.Select(p => p.DisplayName).Contains(x.DisplayName)).ToList();
List<RemoteApplication> remoteAppsToRemove = existingCollectionApps.Where(x => !remoteApps.Select(p => p.Alias).Contains(x.Alias)).ToList();
foreach (var app in remoteAppsToRemove)
{
RemoveRemoteApplicationFromCollection(itemId, collection, app);
@ -1247,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

@ -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)
@ -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

@ -65,5 +65,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
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,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
public string DisplayName { get; set; }
public string FilePath { get; set; }
public string FileVirtualPath { get; set; }
public string RequiredCommandLine { get; set; }
public string Alias { 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

@ -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);

View file

@ -377,7 +377,7 @@ Public Class hMailServer5
objAccount.Password = mailbox.Password
objAccount.MaxSize = mailbox.MaxMailboxSize
objAccount.PersonFirstName = mailbox.FirstName
objAccount.PersonLastName = mailbox.FirstName
objAccount.PersonLastName = mailbox.LastName
objAccount.SignatureEnabled = mailbox.SignatureEnabled
objAccount.SignaturePlainText = mailbox.Signature
objAccount.SignatureHTML = mailbox.SignatureHTML
@ -397,9 +397,12 @@ Public Class hMailServer5
'set forwarding address
If mailbox.ForwardingEnabled Then
objAccount.ForwardAddress = mailbox.ForwardingAddresses(0)
objAccount.ForwardEnabled = True
objAccount.ForwardKeepOriginal = mailbox.RetainLocalCopy
If Not String.IsNullOrEmpty(mailbox.ForwardingAddresses(0)) Then
'Log.WriteInfo("forwarding enabled on creation of email account")
objAccount.ForwardAddress = mailbox.ForwardingAddresses(0)
objAccount.ForwardEnabled = True
objAccount.ForwardKeepOriginal = mailbox.RetainLocalCopy
End If
End If
objAccount.Save()

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;
@ -220,20 +250,20 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
try
{
runSpace = OpenRunspace();
runSpace = OpenRunspace();
var existingServers = GetServersExistingInCollections(runSpace);
existingServers = existingServers.Select(x => x.ToUpper()).Intersect(collection.Servers.Select(x => x.FqdName.ToUpper())).ToList();
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
//Do not install feature here
//Do not install feature here
if (!ExistRdsServerInDeployment(runSpace, server))
{
@ -258,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)))
@ -310,6 +341,74 @@ 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;
@ -544,7 +643,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
Command cmd = new Command("Get-RDRemoteApp");
cmd.Parameters.Add("CollectionName", collectionName);
cmd.Parameters.Add("ConnectionBroker", ConnectionBroker);
cmd.Parameters.Add("DisplayName", applicationName);
cmd.Parameters.Add("Alias", applicationName);
var application = ExecuteShellCommand(runspace, cmd, false).FirstOrDefault();
@ -672,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;
@ -786,7 +891,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
}
internal void CreateRdRapForce(Runspace runSpace, string gatewayHost, string policyName, string collectionName, List<string> groups)
{
{
//New-Item -Path "RDS:\GatewayServer\RAP" -Name "Allow Connections To Everywhere" -UserGroups "Administrators@." -ComputerGroupType 1
//Set-Item -Path "RDS:\GatewayServer\RAP\Allow Connections To Everywhere\PortNumbers" -Value 3389,3390
@ -794,18 +899,34 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
{
RemoveRdRap(runSpace, gatewayHost, policyName);
}
var userGroupParametr = string.Format("@({0})", string.Join(",", groups.Select(x => string.Format("\"{0}@{1}\"", x, RootDomain)).ToArray()));
var computerGroupParametr = string.Format("\"{0}@{1}\"", GetComputersGroupName(collectionName), RootDomain);
Command rdRapCommand = new Command("New-Item");
rdRapCommand.Parameters.Add("Path", string.Format("\"{0}\"", RapPath));
rdRapCommand.Parameters.Add("Name", string.Format("\"{0}\"", policyName));
rdRapCommand.Parameters.Add("UserGroups", userGroupParametr);
rdRapCommand.Parameters.Add("UserGroups", userGroupParametr);
rdRapCommand.Parameters.Add("ComputerGroupType", 1);
rdRapCommand.Parameters.Add("ComputerGroup", computerGroupParametr);
rdRapCommand.Parameters.Add("ComputerGroup", computerGroupParametr);
ExecuteRemoteShellCommand(runSpace, gatewayHost, rdRapCommand, RdsModuleName);
object[] errors;
for (int i = 0; i < 3; i++)
{
Log.WriteWarning(string.Format("Adding RD RAP ... {0}\r\nGateway Host\t{1}\r\nUser Group\t{2}\r\nComputer Group\t{3}", i + 1, gatewayHost, userGroupParametr, computerGroupParametr));
ExecuteRemoteShellCommand(runSpace, gatewayHost, rdRapCommand, out errors, RdsModuleName);
if (errors == null || !errors.Any())
{
Log.WriteWarning("RD RAP Added Successfully");
break;
}
else
{
Log.WriteWarning(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray()));
}
}
}
internal void RemoveRdRap(Runspace runSpace, string gatewayHost, string name)
@ -1071,6 +1192,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
FileVirtualPath = Convert.ToString(GetPSObjectProperty(psObject, "FileVirtualPath"))
};
remoteApp.Alias = remoteApp.DisplayName;
return remoteApp;
}
@ -1084,6 +1207,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;
}
@ -1123,7 +1249,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)
{
@ -1382,6 +1508,12 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
}
internal Collection<PSObject> ExecuteRemoteShellCommand(Runspace runSpace, string hostName, Command cmd, params string[] moduleImports)
{
object[] errors;
return ExecuteRemoteShellCommand(runSpace, hostName, cmd, out errors, moduleImports);
}
internal Collection<PSObject> ExecuteRemoteShellCommand(Runspace runSpace, string hostName, Command cmd, out object[] errors, params string[] moduleImports)
{
Command invokeCommand = new Command("Invoke-Command");
invokeCommand.Parameters.Add("ComputerName", hostName);
@ -1401,9 +1533,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
ScriptBlock sb = invoke.Invoke(string.Format("{{{0}}}", commandString))[0].BaseObject as ScriptBlock;
invokeCommand.Parameters.Add("ScriptBlock", sb);
invokeCommand.Parameters.Add("ScriptBlock", sb);
return ExecuteShellCommand(runSpace, invokeCommand, false);
return ExecuteShellCommand(runSpace, invokeCommand, false, out errors);
}
internal Collection<PSObject> ExecuteRemoteShellCommand(Runspace runSpace, string hostName, List<string> scripts, params string[] moduleImports)
@ -1595,24 +1727,99 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
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));
//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 sessionHosts = ExecuteShellCommand(runSpace, scripts, out errors);
var properties = collection.Settings.GetType().GetProperties();
foreach(var host in sessionHosts)
foreach(var prop in properties)
{
var sessionHost = GetPSObjectProperty(host, "SessionHost");
if (sessionHost != null)
if (prop.Name.ToLower() != "id" && prop.Name.ToLower() != "rdscollectionid")
{
existingHosts.Add(sessionHost.ToString());
var value = prop.GetValue(collection.Settings, null);
if (value != null)
{
cmd.Parameters.Add(prop.Name, value);
}
}
}
return existingHosts;
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);
}
session.UserName = GetUserFullName(session.DomainName, session.UserName, runSpace);
result.Add(session);
}
return result;
}
private string GetUserFullName(string domain, string userName, Runspace runspace)
{
Command cmd = new Command("Get-WmiObject");
cmd.Parameters.Add("Class", "win32_useraccount");
cmd.Parameters.Add("Filter", string.Format("Domain = '{0}' AND Name = '{1}'", domain, userName));
var names = ExecuteShellCommand(runspace, cmd, false);
if (names.Any())
{
return names.First().Members["FullName"].Value.ToString();
}
return "";
}
#endregion

View file

@ -45,8 +45,12 @@ namespace WebsitePanel.Providers.Web.Delegation
using (var srvman = new ServerManager())
{
var adminConfig = srvman.GetAdministrationConfiguration();
//
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
// 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();
// Update rule if exists
@ -103,8 +107,12 @@ namespace WebsitePanel.Providers.Web.Delegation
using (var srvman = new ServerManager())
{
var adminConfig = srvman.GetAdministrationConfiguration();
//
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
// 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();
// Update rule if exists
@ -142,8 +150,12 @@ namespace WebsitePanel.Providers.Web.Delegation
using (var srvman = new ServerManager())
{
var adminConfig = srvman.GetAdministrationConfiguration();
//
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
// 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();
// Update rule if exists
@ -171,8 +183,12 @@ namespace WebsitePanel.Providers.Web.Delegation
using (var srvman = GetServerManager())
{
var adminConfig = srvman.GetAdministrationConfiguration();
//
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
// 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();
// Update rule if exists
@ -245,8 +261,12 @@ namespace WebsitePanel.Providers.Web.Delegation
using (var srvman = GetServerManager())
{
var adminConfig = srvman.GetAdministrationConfiguration();
//
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
// 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();
// Remove rule if exists
@ -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('|'))
{
@ -1207,6 +1207,25 @@ namespace WebsitePanel.Providers.Web
site.ColdFusionVersion = "9";
site.ColdFusionAvailable = true;
}
if (IsColdFusion10Installed())
{
site.ColdFusionVersion = "10";
site.ColdFusionAvailable = true;
}
if (IsColdFusion11Installed())
{
site.ColdFusionVersion = "11";
site.ColdFusionAvailable = true;
}
if (IsColdFusion12Installed())
{
site.ColdFusionVersion = "12";
site.ColdFusionAvailable = true;
}
}
else
{
@ -1477,17 +1496,20 @@ namespace WebsitePanel.Providers.Web
if (site.ColdFusionInstalled)
{
var cfElement = handlersCollection.CreateElement("add");
cfElement["name"] = "coldfusion";
cfElement["modules"] = "IsapiModule";
cfElement["path"] = "*";
cfElement["scriptProcessor"] = base.ColdFusionPath;
cfElement["verb"] = "*";
cfElement["resourceType"] = "Unspecified";
cfElement["requireAccess"] = "None";
cfElement["preCondition"] = "bitness64";
handlersCollection.AddAt(0, cfElement);
if (IsColdFusion7Installed() || IsColdFusion8Installed() || IsColdFusion9Installed())
{
var cfElement = handlersCollection.CreateElement("add");
cfElement["name"] = "coldfusion";
cfElement["modules"] = "IsapiModule";
cfElement["path"] = "*";
cfElement["scriptProcessor"] = base.ColdFusionPath;
cfElement["verb"] = "*";
cfElement["resourceType"] = "Unspecified";
cfElement["requireAccess"] = "None";
cfElement["preCondition"] = "bitness64";
handlersCollection.AddAt(0, cfElement);
}
}
@ -2072,7 +2094,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 +2108,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);
}
@ -3336,7 +3358,14 @@ namespace WebsitePanel.Providers.Web
}
WebVirtualDirectory flashRemotingDir = new WebVirtualDirectory();
flashRemotingDir.Name = "JRunScripts";
if (IsColdFusion10Installed() || IsColdFusion11Installed() || IsColdFusion12Installed())
{
flashRemotingDir.Name = "jakarta";
}
else
{
flashRemotingDir.Name = "JRunScripts";
}
flashRemotingDir.ContentPath = CFFlashRemotingDirPath;
flashRemotingDir.EnableAnonymousAccess = true;
flashRemotingDir.EnableWindowsAuthentication = true;
@ -3354,8 +3383,17 @@ namespace WebsitePanel.Providers.Web
public override void DeleteCFVirtualDirectories(string siteId)
{
DeleteVirtualDirectory(siteId, "CFIDE");
DeleteVirtualDirectory(siteId, "JRunScripts");
if (IsColdFusion10Installed() || IsColdFusion11Installed() || IsColdFusion12Installed())
{
DeleteVirtualDirectory(siteId, "CFIDE");
DeleteVirtualDirectory(siteId, "jakarta");
}
else
{
DeleteVirtualDirectory(siteId, "CFIDE");
DeleteVirtualDirectory(siteId, "JRunScripts");
}
}
@ -3367,8 +3405,16 @@ namespace WebsitePanel.Providers.Web
foreach (WebVirtualDirectory dir in dirs)
{
if (IsColdFusion10Installed() || IsColdFusion11Installed() || IsColdFusion12Installed())
{
if (dir.FullQualifiedPath.Equals("CFIDE") || dir.FullQualifiedPath.Equals("jakarta"))
identifier++;
}
else
{
if (dir.FullQualifiedPath.Equals("CFIDE") || dir.FullQualifiedPath.Equals("JRunScripts"))
identifier++;
}
}
return identifier.Equals(2);
}
@ -4133,6 +4179,9 @@ namespace WebsitePanel.Providers.Web
// Restore setting back
ServerSettings.ADEnabled = adEnabled;
}
//
RemoveDelegationRulesRestrictions(siteName, accountName);
}
private void ReadWebDeployPublishingAccessDetails(WebVirtualDirectory iisObject)
@ -4336,13 +4385,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

@ -145,6 +145,12 @@ namespace WebsitePanel.Providers.Web
public const string FRONTPAGE_ALLPORTS_REGLOC_X64 = @"SOFTWARE\Wow6432Node\Microsoft\Shared Tools\Web Server Extensions\All Ports\";
//ColdFusion related constants
public const string COLDFUSION_12_REGLOC = @"SOFTWARE\Adobe\Install Data\Adobe ColdFusion 12";
public const string COLDFUSION_12_REGLOC_X64 = @"SOFTWARE\Wow6432Node\Adobe\Install Data\Adobe ColdFusion 12";
public const string COLDFUSION_11_REGLOC = @"SOFTWARE\Adobe\Install Data\Adobe ColdFusion 11";
public const string COLDFUSION_11_REGLOC_X64 = @"SOFTWARE\Wow6432Node\Adobe\Install Data\Adobe ColdFusion 11";
public const string COLDFUSION_10_REGLOC = @"SOFTWARE\Adobe\Install Data\Adobe ColdFusion 10";
public const string COLDFUSION_10_REGLOC_X64 = @"SOFTWARE\Wow6432Node\Adobe\Install Data\Adobe ColdFusion 10";
public const string COLDFUSION_9_REGLOC = @"SOFTWARE\Adobe\Install Data\Adobe ColdFusion 9";
public const string COLDFUSION_9_REGLOC_X64 = @"SOFTWARE\Wow6432Node\Adobe\Install Data\Adobe ColdFusion 9";
public const string COLDFUSION_8_REGLOC = @"SOFTWARE\Adobe\Install Data\Adobe ColdFusion 8";
@ -422,6 +428,25 @@ namespace WebsitePanel.Providers.Web
site.ColdFusionVersion = "9";
site.ColdFusionAvailable = true;
}
if (IsColdFusion10Installed())
{
site.ColdFusionVersion = "10";
site.ColdFusionAvailable = true;
}
if (IsColdFusion11Installed())
{
site.ColdFusionVersion = "11";
site.ColdFusionAvailable = true;
}
if (IsColdFusion12Installed())
{
site.ColdFusionVersion = "12";
site.ColdFusionAvailable = true;
}
}
else
{
@ -430,11 +455,16 @@ namespace WebsitePanel.Providers.Web
WebVirtualDirectory[] virtdirs = GetVirtualDirectories(siteId);
if (VirtualDirectoryExists(siteId, "CFIDE") && VirtualDirectoryExists(siteId, "JRunScripts"))
{
site.CreateCFVirtualDirectories = true;
}
if (IsColdFusion10Installed() || IsColdFusion11Installed() || IsColdFusion12Installed())
{
if (VirtualDirectoryExists(siteId, "CFIDE") && VirtualDirectoryExists(siteId, "jakarta"));
site.CreateCFVirtualDirectories = true;
}
else
{
if (VirtualDirectoryExists(siteId, "CFIDE") && VirtualDirectoryExists(siteId, "JRunScripts"));
site.CreateCFVirtualDirectories = true;
}
{
site.CreateCFVirtualDirectories = false;
}
@ -808,7 +838,14 @@ namespace WebsitePanel.Providers.Web
WebVirtualDirectory[] virtdirs = GetVirtualDirectories(site.SiteId);
bool cfDirsinstalled = false;
if (VirtualDirectoryExists(site.SiteId, "CFIDE") && VirtualDirectoryExists(site.SiteId, "JRunScripts"))
if (IsColdFusion10Installed() || IsColdFusion11Installed() || IsColdFusion12Installed())
{
if (VirtualDirectoryExists(site.SiteId, "CFIDE") && VirtualDirectoryExists(site.SiteId, "jakarta"));
}
else
{
if (VirtualDirectoryExists(site.SiteId, "CFIDE") && VirtualDirectoryExists(site.SiteId, "JRunScripts"));
}
{
cfDirsinstalled = true;
}
@ -1077,7 +1114,14 @@ namespace WebsitePanel.Providers.Web
}
WebVirtualDirectory flashRemotingDir = new WebVirtualDirectory();
flashRemotingDir.Name = "JRunScripts";
if (IsColdFusion10Installed() || IsColdFusion11Installed() || IsColdFusion12Installed())
{
flashRemotingDir.Name = "jakarta";
}
else
{
flashRemotingDir.Name = "JRunScripts";
}
flashRemotingDir.ContentPath = CFFlashRemotingDirPath;
flashRemotingDir.EnableAnonymousAccess = true;
flashRemotingDir.EnableWindowsAuthentication = true;
@ -1095,8 +1139,16 @@ namespace WebsitePanel.Providers.Web
public virtual void DeleteCFVirtualDirectories(string siteId)
{
DeleteVirtualDirectory(siteId, "CFIDE");
DeleteVirtualDirectory(siteId, "JRunScripts");
if (IsColdFusion10Installed() || IsColdFusion11Installed() || IsColdFusion12Installed())
{
DeleteVirtualDirectory(siteId, "CFIDE");
DeleteVirtualDirectory(siteId, "jakarta");
}
else
{
DeleteVirtualDirectory(siteId, "CFIDE");
DeleteVirtualDirectory(siteId, "JRunScripts");
}
}
@ -1307,9 +1359,60 @@ namespace WebsitePanel.Providers.Web
public virtual bool IsColdFusionSystemInstalled()
{
return (IsColdFusion8Installed() || IsColdFusion7Installed() || IsColdFusion9Installed());
return (IsColdFusion8Installed() || IsColdFusion7Installed() || IsColdFusion10Installed() || IsColdFusion11Installed() || IsColdFusion12Installed() || IsColdFusion9Installed());
}
protected bool IsColdFusion12Installed()
{
RegistryKey keyColdFusion = Registry.LocalMachine.OpenSubKey(COLDFUSION_12_REGLOC);
if (keyColdFusion == null)
{
keyColdFusion = Registry.LocalMachine.OpenSubKey(COLDFUSION_12_REGLOC_X64);
if (keyColdFusion == null)
return false;
}
if (!String.IsNullOrEmpty((string)keyColdFusion.GetValue(COLDFUSION_ROOT_PATH)))
{
return true;
}
return false;
}
protected bool IsColdFusion11Installed()
{
RegistryKey keyColdFusion = Registry.LocalMachine.OpenSubKey(COLDFUSION_11_REGLOC);
if (keyColdFusion == null)
{
keyColdFusion = Registry.LocalMachine.OpenSubKey(COLDFUSION_11_REGLOC_X64);
if (keyColdFusion == null)
return false;
}
if (!String.IsNullOrEmpty((string)keyColdFusion.GetValue(COLDFUSION_ROOT_PATH)))
{
return true;
}
return false;
}
protected bool IsColdFusion10Installed()
{
RegistryKey keyColdFusion = Registry.LocalMachine.OpenSubKey(COLDFUSION_10_REGLOC);
if (keyColdFusion == null)
{
keyColdFusion = Registry.LocalMachine.OpenSubKey(COLDFUSION_10_REGLOC_X64);
if (keyColdFusion == null)
return false;
}
if (!String.IsNullOrEmpty((string)keyColdFusion.GetValue(COLDFUSION_ROOT_PATH)))
{
return true;
}
return false;
}
protected bool IsColdFusion9Installed()
{
RegistryKey keyColdFusion = Registry.LocalMachine.OpenSubKey(COLDFUSION_9_REGLOC);
@ -1399,6 +1502,49 @@ namespace WebsitePanel.Providers.Web
}
return String.Empty;
if (IsColdFusion10Installed())
{
RegistryKey keyColdFusion = Registry.LocalMachine.OpenSubKey(COLDFUSION_10_REGLOC);
if (keyColdFusion == null)
{
keyColdFusion = Registry.LocalMachine.OpenSubKey(COLDFUSION_10_REGLOC_X64);
if (keyColdFusion == null)
return String.Empty;
}
return (string)keyColdFusion.GetValue(COLDFUSION_ROOT_PATH);
}
return String.Empty;
if (IsColdFusion11Installed())
{
RegistryKey keyColdFusion = Registry.LocalMachine.OpenSubKey(COLDFUSION_11_REGLOC);
if (keyColdFusion == null)
{
keyColdFusion = Registry.LocalMachine.OpenSubKey(COLDFUSION_11_REGLOC_X64);
if (keyColdFusion == null)
return String.Empty;
}
return (string)keyColdFusion.GetValue(COLDFUSION_ROOT_PATH);
}
return String.Empty;
if (IsColdFusion12Installed())
{
RegistryKey keyColdFusion = Registry.LocalMachine.OpenSubKey(COLDFUSION_12_REGLOC);
if (keyColdFusion == null)
{
keyColdFusion = Registry.LocalMachine.OpenSubKey(COLDFUSION_12_REGLOC_X64);
if (keyColdFusion == null)
return String.Empty;
}
return (string)keyColdFusion.GetValue(COLDFUSION_ROOT_PATH);
}
return String.Empty;
}
protected void EnableColdFusionScripting(string siteName)

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;
@ -101,6 +77,10 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
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";
@ -109,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;
@ -172,6 +158,12 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
/// <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)]
@ -217,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)]
@ -1140,6 +1214,91 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
}
}
/// <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);
@ -1172,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);
@ -1607,4 +1796,34 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
}
}
}
/// <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

@ -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)
{
@ -427,5 +461,39 @@ namespace WebsitePanel.Server
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

@ -5,21 +5,23 @@ using WebsitePanel.WebDavPortal.WebConfigSections;
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();
CobaltFileTtl = ConfigSection.OfficeOnline.CobaltFileTtl;
_officeExtensions = ConfigSection.OfficeOnline.Cast<OfficeOnlineElement>().ToList();
}
public bool IsEnabled { get; private set; }
public string Url { get; private set; }
public int CobaltFileTtl { get; private set; }
public IEnumerator<string> GetEnumerator()
public IEnumerator<OfficeOnlineElement> GetEnumerator()
{
return _officeExtensions.GetEnumerator();
}
@ -36,7 +38,7 @@ namespace WebsitePanel.WebDav.Core.Config.Entities
public bool Contains(string extension)
{
return _officeExtensions.Contains(extension);
return _officeExtensions.Any(x=>x.Extension == extension);
}
}
}

View file

@ -0,0 +1,57 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using WebsitePanel.WebDav.Core.Config.WebConfigSections;
namespace WebsitePanel.WebDav.Core.Config.Entities
{
public class OwaSupportedBrowsersCollection : AbstractConfigCollection, IReadOnlyDictionary<string, int>
{
private readonly IDictionary<string, int> _browsers;
public OwaSupportedBrowsersCollection()
{
_browsers = ConfigSection.OwaSupportedBrowsers.Cast<OwaSupportedBrowsersElement>().ToDictionary(x => x.Browser, y => y.Version);
}
public IEnumerator<KeyValuePair<string, int>> GetEnumerator()
{
return _browsers.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public int Count
{
get { return _browsers.Count; }
}
public bool ContainsKey(string browser)
{
return _browsers.ContainsKey(browser);
}
public bool TryGetValue(string browser, out int version)
{
return _browsers.TryGetValue(browser, out version);
}
public int this[string browser]
{
get { return ContainsKey(browser) ? _browsers[browser] : 0; }
}
public IEnumerable<string> Keys
{
get { return _browsers.Keys; }
}
public IEnumerable<int> Values
{
get { return _browsers.Values; }
}
}
}

View file

@ -1,5 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
using WebsitePanel.WebDav.Core.Config.WebConfigSections;
using WebsitePanel.WebDavPortal.WebConfigSections;
namespace WebsitePanel.WebDav.Core.Config.Entities
@ -33,6 +35,26 @@ namespace WebsitePanel.WebDav.Core.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

@ -12,5 +12,6 @@ namespace WebsitePanel.WebDav.Core.Config
FileIconsDictionary FileIcons { get; }
HttpErrorsCollection HttpErrors { get; }
OfficeOnlineCollection OfficeOnline { get; }
OwaSupportedBrowsersCollection OwaSupportedBrowsers { get; }
}
}

View file

@ -5,6 +5,8 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
public class OfficeOnlineElement : ConfigurationElement
{
private const string ExtensionKey = "extension";
private const string OwaViewKey = "OwaView";
private const string OwaEditorKey = "OwaEditor";
[ConfigurationProperty(ExtensionKey, IsKey = true, IsRequired = true)]
public string Extension
@ -12,5 +14,19 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
get { return this[ExtensionKey].ToString(); }
set { this[ExtensionKey] = value; }
}
[ConfigurationProperty(OwaViewKey, IsKey = true, IsRequired = true)]
public string OwaView
{
get { return this[OwaViewKey].ToString(); }
set { this[OwaViewKey] = value; }
}
[ConfigurationProperty(OwaEditorKey, IsKey = true, IsRequired = true)]
public string OwaEditor
{
get { return this[OwaEditorKey].ToString(); }
set { this[OwaEditorKey] = value; }
}
}
}

View file

@ -8,6 +8,7 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
{
private const string UrlKey = "url";
private const string IsEnabledKey = "isEnabled";
private const string CobaltFileTtlKey = "cobaltFileTtl";
[ConfigurationProperty(UrlKey, IsKey = true, IsRequired = true)]
public string Url
@ -23,6 +24,13 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
set { this[IsEnabledKey] = value; }
}
[ConfigurationProperty(CobaltFileTtlKey, IsKey = true, IsRequired = true)]
public int CobaltFileTtl
{
get { return int.Parse(this[CobaltFileTtlKey].ToString()); }
set { this[CobaltFileTtlKey] = value; }
}
protected override ConfigurationElement CreateNewElement()
{
return new OfficeOnlineElement();

View file

@ -0,0 +1,24 @@
using System.Configuration;
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
{
public class OwaSupportedBrowsersElement : ConfigurationElement
{
private const string BrowserKey = "browser";
private const string VersionKey = "version";
[ConfigurationProperty(BrowserKey, IsKey = true, IsRequired = true)]
public string Browser
{
get { return (string)this[BrowserKey]; }
set { this[BrowserKey] = value; }
}
[ConfigurationProperty(VersionKey, IsKey = true, IsRequired = true)]
public int Version
{
get { return (int)this[VersionKey]; }
set { this[VersionKey] = value; }
}
}
}

View file

@ -0,0 +1,18 @@
using System.Configuration;
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
{
[ConfigurationCollection(typeof(OwaSupportedBrowsersElement))]
public class OwaSupportedBrowsersElementCollection : ConfigurationElementCollection
{
protected override ConfigurationElement CreateNewElement()
{
return new OwaSupportedBrowsersElement();
}
protected override object GetElementKey(ConfigurationElement element)
{
return ((OwaSupportedBrowsersElement)element).Browser;
}
}
}

View file

@ -1,6 +1,6 @@
using System.Configuration;
namespace WebsitePanel.WebDavPortal.WebConfigSections
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
{
public class SessionKeysElement : ConfigurationElement
{
@ -10,6 +10,8 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
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

@ -6,6 +6,7 @@ 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";
@ -14,6 +15,7 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
private const string ConnectionStringsKey = "appConnectionStrings";
private const string SessionKeysKey = "sessionKeys";
private const string FileIconsKey = "fileIcons";
private const string OwaSupportedBrowsersKey = "owaSupportedBrowsers";
private const string OfficeOnlineKey = "officeOnline";
public const string SectionName = "webDavExplorerConfigurationSettings";
@ -25,6 +27,13 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
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
{
@ -67,6 +76,13 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
set { this[FileIconsKey] = value; }
}
[ConfigurationProperty(OwaSupportedBrowsersKey, IsDefaultCollection = false)]
public OwaSupportedBrowsersElementCollection OwaSupportedBrowsers
{
get { return (OwaSupportedBrowsersElementCollection)this[OwaSupportedBrowsersKey]; }
set { this[OwaSupportedBrowsersKey] = value; }
}
[ConfigurationProperty(OfficeOnlineKey, IsDefaultCollection = false)]
public OfficeOnlineElementCollection OfficeOnline
{

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

@ -18,6 +18,7 @@ namespace WebsitePanel.WebDav.Core.Config
FileIcons = new FileIconsDictionary();
HttpErrors = new HttpErrorsCollection();
OfficeOnline = new OfficeOnlineCollection();
OwaSupportedBrowsers = new OwaSupportedBrowsersCollection();
}
public static WebDavAppConfigManager Instance
@ -30,6 +31,11 @@ namespace WebsitePanel.WebDav.Core.Config
get { return _configSection.UserDomain.Value; }
}
public string WebdavRoot
{
get { return _configSection.WebdavRoot.Value; }
}
public string ApplicationName
{
get { return _configSection.ApplicationName.Value; }
@ -46,5 +52,6 @@ namespace WebsitePanel.WebDav.Core.Config
public FileIconsDictionary FileIcons { get; private set; }
public HttpErrorsCollection HttpErrors { get; private set; }
public OfficeOnlineCollection OfficeOnline { get; private set; }
public OwaSupportedBrowsersCollection OwaSupportedBrowsers { get; private set; }
}
}

View file

@ -0,0 +1,131 @@
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 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 bool UserCanWrite { get; set; }
[DataMember]
public string DownloadUrl { get; set; }
[DataMember]
public bool ReadOnly { get; set; }
//[DataMember]
//public bool UserCanNotWriteRelative { 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 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 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 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

@ -0,0 +1,10 @@
namespace WebsitePanel.WebDav.Core.Entities.Owa
{
public class PutRelativeFile
{
public string Name { get; set; }
public string Url { get; set; }
public string HostViewUrl { get; set; }
public string HostEditUrl { 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,12 @@
namespace WebsitePanel.WebDav.Core.Extensions
{
public static class StringExtensions
{
public static string ReplaceLast(this string source, string target, string newValue)
{
int index = source.LastIndexOf(target);
string result = source.Remove(index, target.Length).Insert(index, newValue);
return result;
}
}
}

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));
@ -296,6 +301,36 @@ namespace WebsitePanel.WebDav.Core
XmlCurrentPropNode.NamespaceURI),
XmlCurrentPropNode.InnerXml));
break;
//case "lockdiscovery":
//{
// if (XmlCurrentPropNode.HasChildNodes == false)
// {
// break;
// }
// foreach (XmlNode activeLockNode in XmlCurrentPropNode.FirstChild)
// {
// switch (activeLockNode.LocalName)
// {
// case "owner":
// item.SetProperty(
// new Property(
// new PropertyName("owner",
// activeLockNode.NamespaceURI),
// activeLockNode.InnerXml));
// break;
// case "locktoken":
// var lockTokenNode = activeLockNode.FirstChild;
// item.SetProperty(
// new Property(
// new PropertyName("locktoken",
// lockTokenNode.NamespaceURI),
// lockTokenNode.InnerXml));
// break;
// }
// }
// break;
//}
}
}
break;

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; }
@ -73,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
@ -314,6 +337,69 @@ namespace WebsitePanel.WebDav.Core
}
}
/// <summary>
/// Lock this item.
/// </summary>
public string Lock()
{
var credentials = (NetworkCredential)_credentials;
string lockToken = string.Empty;
string lockXml =string.Format( "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" +
"<D:lockinfo xmlns:D='DAV:'>" +
"<D:lockscope><D:exclusive/></D:lockscope>" +
"<D:locktype><D:write/></D:locktype>" +
"<D:owner>{0}</D:owner>" +
"</D:lockinfo>", WspContext.User.Login);
string auth = "Basic " +
Convert.ToBase64String(
Encoding.Default.GetBytes(credentials.UserName + ":" + credentials.Password));
WebRequest webRequest = WebRequest.Create(Href);
webRequest.Method = "LOCK";
webRequest.Credentials = credentials;
webRequest.Headers.Add("Authorization", auth);
webRequest.PreAuthenticate = true;
webRequest.ContentType = "application/xml";
// Retrieve the request stream.
using (Stream requestStream = webRequest.GetRequestStream())
{
// Write the lock XML to the destination.
requestStream.Write(Encoding.UTF8.GetBytes(lockXml), 0, lockXml.Length);
}
using (WebResponse webResponse = webRequest.GetResponse())
{
lockToken = webResponse.Headers["Lock-Token"];
}
return lockToken;
}
/// <summary>
/// Lock this item.
/// </summary>
public void UnLock()
{
WebRequest webRequest = WebRequest.Create(Href);
webRequest.Method = "UNLOCK";
webRequest.Credentials = _credentials;
webRequest.PreAuthenticate = true;
webRequest.Headers.Add(@"Lock-Token", Properties.First(x => x.Name.Name == "locktoken").StringValue);
using (WebResponse webResponse = webRequest.GetResponse())
{
//TODO unlock
}
}
public bool AllowWriteStreamBuffering { get; set; }
public bool SendChunked { get; set; }
@ -405,6 +491,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 +613,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,22 @@
using System.Collections.Generic;
using System.IO;
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);
bool FileExist(string path);
byte[] GetFileBytes(string path);
void UploadFile(string path, HttpPostedFileBase file);
void UploadFile(string path, byte[] bytes);
void UploadFile(string path, Stream stream);
IResource GetResource(string path);
string GetFileUrl(string path);
void DeleteResource(string path);
void LockFile(string path);
}
}

View file

@ -0,0 +1,10 @@
using System.IO;
using Cobalt;
namespace WebsitePanel.WebDav.Core.Interfaces.Owa
{
public interface ICobaltManager
{
Atom ProcessRequest(int accessTokenId, Stream requestStream);
}
}

View file

@ -0,0 +1,12 @@
using Cobalt;
namespace WebsitePanel.WebDav.Core.Interfaces.Owa
{
public interface IWopiFileManager
{
CobaltFile Create(int accessTokenId);
CobaltFile Get(string filePath);
bool Add(string filePath, CobaltFile file);
bool Delete(string filePath);
}
}

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

@ -3,6 +3,8 @@ 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

View file

@ -0,0 +1,11 @@
using WebsitePanel.WebDav.Core.Security.Authentication.Principals;
using WebsitePanel.WebDav.Core.Security.Authorization.Enums;
namespace WebsitePanel.WebDav.Core.Interfaces.Security
{
public interface IWebDavAuthorizationService
{
bool HasAccess(WspPrincipal principal, string path);
WebDavPermissions GetPermissions(WspPrincipal principal, string path);
}
}

View file

@ -0,0 +1,9 @@
namespace WebsitePanel.WebDav.Core.Interfaces.Storages
{
public interface IKeyValueStorage
{
TV Get<TV>(string id);
bool Add<TV>(string id, TV value);
bool Delete(string id);
}
}

View file

@ -0,0 +1,9 @@
using WebsitePanel.Ecommerce.EnterpriseServer;
namespace WebsitePanel.WebDav.Core.Interfaces.Storages
{
public interface ITtlStorage : IKeyValueStorage
{
void SetTtl<TV>(string id, TV value);
}
}

View file

@ -0,0 +1,42 @@
using System;
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
using WebsitePanel.WebDav.Core.Interfaces.Managers;
using WebsitePanel.WebDav.Core.Security.Authentication.Principals;
using WebsitePanel.WebDav.Core.Wsp.Framework;
namespace WebsitePanel.WebDav.Core.Managers
{
public class AccessTokenManager : IAccessTokenManager
{
public WebDavAccessToken CreateToken(WspPrincipal principal, string filePath)
{
var token = new WebDavAccessToken();
token.AccessToken = Guid.NewGuid();
token.AccountId = principal.AccountId;
token.ItemId = principal.ItemId;
token.AuthData = principal.EncryptedPassword;
token.ExpirationDate = DateTime.Now.AddHours(3);
token.FilePath = filePath;
token.Id = WSP.Services.EnterpriseStorage.AddWebDavAccessToken(token);
return token;
}
public WebDavAccessToken GetToken(int id)
{
return WSP.Services.EnterpriseStorage.GetWebDavAccessTokenById(id);
}
public WebDavAccessToken GetToken(Guid guid)
{
return WSP.Services.EnterpriseStorage.GetWebDavAccessTokenByAccessToken(guid);
}
public void ClearExpiredTokens()
{
WSP.Services.EnterpriseStorage.DeleteExpiredWebDavAccessTokens();
}
}
}

View file

@ -0,0 +1,359 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Xml.Serialization;
using log4net;
using WebsitePanel.Providers.OS;
using WebsitePanel.WebDav.Core.Client;
using WebsitePanel.WebDav.Core.Config;
using WebsitePanel.WebDav.Core.Exceptions;
using WebsitePanel.WebDav.Core.Extensions;
using WebsitePanel.WebDav.Core.Interfaces.Managers;
using WebsitePanel.WebDav.Core.Resources;
using WebsitePanel.WebDav.Core.Security.Cryptography;
using WebsitePanel.WebDav.Core.Wsp.Framework;
namespace WebsitePanel.WebDav.Core.Managers
{
public class WebDavManager : IWebDavManager
{
private readonly ICryptography _cryptography;
private readonly WebDavSession _webDavSession;
private readonly ILog Log;
private bool _isRoot = true;
private IFolder _currentFolder;
public WebDavManager(ICryptography cryptography)
{
_cryptography = cryptography;
Log = LogManager.GetLogger(this.GetType());
_webDavSession = new WebDavSession();
}
public IEnumerable<IHierarchyItem> OpenFolder(string pathPart)
{
IHierarchyItem[] children;
if (string.IsNullOrWhiteSpace(pathPart))
{
var resources = ConnectToWebDavServer().Select(x => new WebDavResource { Href = new Uri(x.Url), ItemType = ItemType.Folder }).ToArray();
var items = WSP.Services.EnterpriseStorage.GetEnterpriseFolders(WspContext.User.ItemId);
foreach (var resource in resources)
{
var folder = items.FirstOrDefault(x => x.Name == resource.DisplayName);
if (folder == null)
{
continue;
}
resource.ContentLength = folder.Size;
resource.AllocatedSpace = folder.FRSMQuotaMB;
resource.IsRootItem = true;
}
children = resources;
}
else
{
if (_currentFolder == null || _currentFolder.Path.ToString() != pathPart)
{
_webDavSession.Credentials = new NetworkCredential(WspContext.User.Login,
_cryptography.Decrypt(WspContext.User.EncryptedPassword),
WebDavAppConfigManager.Instance.UserDomain);
_currentFolder = _webDavSession.OpenFolder(string.Format("{0}{1}/{2}", WebDavAppConfigManager.Instance.WebdavRoot, WspContext.User.OrganizationId, pathPart.TrimStart('/')));
}
children = _currentFolder.GetChildren().Where(x => !WebDavAppConfigManager.Instance.ElementsRendering.ElementsToIgnore.Contains(x.DisplayName.Trim('/'))).ToArray();
}
List<IHierarchyItem> sortedChildren = children.Where(x => x.ItemType == ItemType.Folder).OrderBy(x => x.DisplayName).ToList();
sortedChildren.AddRange(children.Where(x => x.ItemType != ItemType.Folder).OrderBy(x => x.DisplayName));
return sortedChildren;
}
public bool IsFile(string path)
{
string folder = GetFileFolder(path);
if (string.IsNullOrWhiteSpace(folder))
{
return false;
}
var resourceName = GetResourceName(path);
OpenFolder(folder);
IResource resource = _currentFolder.GetResource(resourceName);
return resource.ItemType != ItemType.Folder;
}
public byte[] GetFileBytes(string path)
{
try
{
string folder = GetFileFolder(path);
var resourceName = GetResourceName(path);
OpenFolder(folder);
IResource resource = _currentFolder.GetResource(resourceName);
Stream stream = resource.GetReadStream();
byte[] fileBytes = ReadFully(stream);
return fileBytes;
}
catch (InvalidOperationException exception)
{
throw new ResourceNotFoundException("Resource not found", exception);
}
}
public void UploadFile(string path, HttpPostedFileBase file)
{
var resource = new WebDavResource();
var fileUrl = new Uri(WebDavAppConfigManager.Instance.WebdavRoot)
.Append(WspContext.User.OrganizationId)
.Append(path)
.Append(Path.GetFileName(file.FileName));
resource.SetHref(fileUrl);
resource.SetCredentials(new NetworkCredential(WspContext.User.Login, _cryptography.Decrypt(WspContext.User.EncryptedPassword)));
file.InputStream.Seek(0, SeekOrigin.Begin);
var bytes = ReadFully(file.InputStream);
resource.Upload(bytes);
}
public void UploadFile(string path, byte[] bytes)
{
var resource = new WebDavResource();
var fileUrl = new Uri(WebDavAppConfigManager.Instance.WebdavRoot)
.Append(WspContext.User.OrganizationId)
.Append(path);
resource.SetHref(fileUrl);
resource.SetCredentials(new NetworkCredential(WspContext.User.Login, _cryptography.Decrypt(WspContext.User.EncryptedPassword)));
resource.Upload(bytes);
}
public void UploadFile(string path, Stream stream)
{
var resource = new WebDavResource();
var fileUrl = new Uri(WebDavAppConfigManager.Instance.WebdavRoot)
.Append(WspContext.User.OrganizationId)
.Append(path);
resource.SetHref(fileUrl);
resource.SetCredentials(new NetworkCredential(WspContext.User.Login, _cryptography.Decrypt(WspContext.User.EncryptedPassword)));
var bytes = ReadFully(stream);
resource.Upload(bytes);
}
public void LockFile(string path)
{
var resource = new WebDavResource();
var fileUrl = new Uri(WebDavAppConfigManager.Instance.WebdavRoot)
.Append(WspContext.User.OrganizationId)
.Append(path);
resource.SetHref(fileUrl);
resource.SetCredentials(new NetworkCredential(WspContext.User.Login, _cryptography.Decrypt(WspContext.User.EncryptedPassword)));
resource.Lock();
}
public void DeleteResource(string path)
{
path = RemoveLeadingFromPath(path, "office365");
path = RemoveLeadingFromPath(path, "view");
path = RemoveLeadingFromPath(path, "edit");
path = RemoveLeadingFromPath(path, WspContext.User.OrganizationId);
string folderPath = GetFileFolder(path);
OpenFolder(folderPath);
var resourceName = GetResourceName(path);
IResource resource = _currentFolder.GetResource(resourceName);
if (resource.ItemType == ItemType.Folder && GetFoldersItemsCount(path) > 0)
{
throw new WebDavException(string.Format(WebDavResources.FolderIsNotEmptyFormat, resource.DisplayName));
}
resource.Delete();
}
public IResource GetResource(string path)
{
try
{
string folder = GetFileFolder(path);
var resourceName = GetResourceName(path);
OpenFolder(folder);
return _currentFolder.GetResource(resourceName);
}
catch (InvalidOperationException exception)
{
throw new ResourceNotFoundException("Resource not found", exception);
}
}
public bool FileExist(string path)
{
try
{
string folder = GetFileFolder(path);
var resourceName = GetResourceName(path);
OpenFolder(folder);
var resource = _currentFolder.GetResource(resourceName);
return resource != null;
}
catch (InvalidOperationException exception)
{
return false;
}
}
public string GetFileUrl(string path)
{
try
{
string folder = GetFileFolder(path);
var resourceName = GetResourceName(path);
OpenFolder(folder);
IResource resource = _currentFolder.GetResource(resourceName);
return resource.Href.ToString();
}
catch (InvalidOperationException exception)
{
throw new ResourceNotFoundException("Resource not found", exception);
}
}
private IList<SystemFile> ConnectToWebDavServer()
{
var rootFolders = new List<SystemFile>();
var user = WspContext.User;
var userGroups = WSP.Services.Organizations.GetSecurityGroupsByMember(user.ItemId, user.AccountId);
foreach (var folder in WSP.Services.EnterpriseStorage.GetEnterpriseFolders(WspContext.User.ItemId))
{
var permissions = WSP.Services.EnterpriseStorage.GetEnterpriseFolderPermissions(WspContext.User.ItemId, folder.Name);
foreach (var permission in permissions)
{
if ((!permission.IsGroup
&& (permission.DisplayName == user.UserName || permission.DisplayName == user.DisplayName))
|| (permission.IsGroup && userGroups.Any(x => x.DisplayName == permission.DisplayName)))
{
rootFolders.Add(folder);
break;
}
}
}
return rootFolders;
}
private int GetFoldersItemsCount(string path)
{
var items = OpenFolder(path);
return items.Count();
}
#region Helpers
private string RemoveLeadingFromPath(string pathPart, string toRemove)
{
return pathPart.StartsWith('/' + toRemove) ? pathPart.Substring(toRemove.Length + 1) : pathPart;
}
private byte[] ReadFully(Stream input)
{
var buffer = new byte[16 * 1024];
using (var ms = new MemoryStream())
{
int read;
while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
ms.Write(buffer, 0, read);
return ms.ToArray();
}
}
public void WriteTo(Stream sourceStream, Stream targetStream)
{
byte[] buffer = new byte[16 * 1024];
int n;
while ((n = sourceStream.Read(buffer, 0, buffer.Length)) != 0)
targetStream.Write(buffer, 0, n);
}
private string GetFileFolder(string path)
{
path = path.TrimEnd('/');
if (string.IsNullOrEmpty(path) || !path.Contains('/'))
{
return string.Empty;
}
string fileName = path.Split('/').Last();
int index = path.LastIndexOf(fileName, StringComparison.InvariantCultureIgnoreCase);
string folder = string.IsNullOrEmpty(fileName)? path : path.Remove(index - 1, fileName.Length + 1);
return folder;
}
private string GetResourceName(string path)
{
path = path.TrimEnd('/');
if (string.IsNullOrEmpty(path) || !path.Contains('/'))
{
return string.Empty;
}
return path.Split('/').Last(); ;
}
#endregion
}
}

View file

@ -0,0 +1,245 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Cobalt;
using WebsitePanel.WebDav.Core;
namespace WebsitePanel.WebDav.Core.Owa
{
public class CobaltHostLockingStore : HostLockingStore
{
public override WhoAmIRequest.OutputType HandleWhoAmI(WhoAmIRequest.InputType input)
{
WhoAmIRequest.OutputType result = new WhoAmIRequest.OutputType();
result.UserIsAnonymous = WspContext.User == null;
if (WspContext.User != null)
{
result.UserEmailAddress = WspContext.User.Login;
result.UserLogin = WspContext.User.Login;
result.UserName = WspContext.User.DisplayName;
}
return result;
}
public override ServerTimeRequest.OutputType HandleServerTime(ServerTimeRequest.InputType input)
{
ServerTimeRequest.OutputType result = new ServerTimeRequest.OutputType();
result.ServerTime = DateTime.UtcNow;
return result;
}
public override LockAndCheckOutStatusRequest.OutputType HandleLockAndCheckOutStatus(LockAndCheckOutStatusRequest.InputType input)
{
LockAndCheckOutStatusRequest.OutputType result = new LockAndCheckOutStatusRequest.OutputType();
result.LockType = 1U;
result.CheckOutType = 0U;
return result;
}
public override GetExclusiveLockRequest.OutputType HandleGetExclusiveLock(GetExclusiveLockRequest.InputType input)
{
GetExclusiveLockRequest.OutputType result = new GetExclusiveLockRequest.OutputType();
return result;
}
public override RefreshExclusiveLockRequest.OutputType HandleRefreshExclusiveLock(RefreshExclusiveLockRequest.InputType input)
{
RefreshExclusiveLockRequest.OutputType result = new RefreshExclusiveLockRequest.OutputType();
return result;
}
public override CheckExclusiveLockAvailabilityRequest.OutputType HandleCheckExclusiveLockAvailability(CheckExclusiveLockAvailabilityRequest.InputType input)
{
CheckExclusiveLockAvailabilityRequest.OutputType result = new CheckExclusiveLockAvailabilityRequest.OutputType();
return result;
}
public override ConvertExclusiveLockToSchemaLockRequest.OutputType HandleConvertExclusiveLockToSchemaLock(ConvertExclusiveLockToSchemaLockRequest.InputType input, int protocolMajorVersion, int protocolMinorVersion)
{
ConvertExclusiveLockToSchemaLockRequest.OutputType result = new ConvertExclusiveLockToSchemaLockRequest.OutputType();
return result;
}
public override ConvertExclusiveLockWithCoauthTransitionRequest.OutputType HandleConvertExclusiveLockWithCoauthTransition(ConvertExclusiveLockWithCoauthTransitionRequest.InputType input, int protocolMajorVersion, int protocolMinorVersion)
{
ConvertExclusiveLockWithCoauthTransitionRequest.OutputType result = new ConvertExclusiveLockWithCoauthTransitionRequest.OutputType();
return result;
}
public override GetSchemaLockRequest.OutputType HandleGetSchemaLock(GetSchemaLockRequest.InputType input, int protocolMajorVersion, int protocolMinorVersion)
{
GetSchemaLockRequest.OutputType result = new GetSchemaLockRequest.OutputType();
return result;
}
public override ReleaseExclusiveLockRequest.OutputType HandleReleaseExclusiveLock(ReleaseExclusiveLockRequest.InputType input)
{
ReleaseExclusiveLockRequest.OutputType result = new ReleaseExclusiveLockRequest.OutputType();
return result;
}
public override ReleaseSchemaLockRequest.OutputType HandleReleaseSchemaLock(ReleaseSchemaLockRequest.InputType input, int protocolMajorVersion, int protocolMinorVersion)
{
ReleaseSchemaLockRequest.OutputType result = new ReleaseSchemaLockRequest.OutputType();
return result;
}
public override RefreshSchemaLockRequest.OutputType HandleRefreshSchemaLock(RefreshSchemaLockRequest.InputType input, int protocolMajorVersion, int protocolMinorVersion)
{
RefreshSchemaLockRequest.OutputType result = new RefreshSchemaLockRequest.OutputType();
result.Lock = LockType.SchemaLock;
return result;
}
public override ConvertSchemaLockToExclusiveLockRequest.OutputType HandleConvertSchemaLockToExclusiveLock(ConvertSchemaLockToExclusiveLockRequest.InputType input)
{
ConvertSchemaLockToExclusiveLockRequest.OutputType result = new ConvertSchemaLockToExclusiveLockRequest.OutputType();
return result;
}
public override CheckSchemaLockAvailabilityRequest.OutputType HandleCheckSchemaLockAvailability(CheckSchemaLockAvailabilityRequest.InputType input)
{
CheckSchemaLockAvailabilityRequest.OutputType result = new CheckSchemaLockAvailabilityRequest.OutputType();
return result;
}
public override JoinCoauthoringRequest.OutputType HandleJoinCoauthoring(JoinCoauthoringRequest.InputType input, int protocolMajorVersion, int protocolMinorVersion)
{
JoinCoauthoringRequest.OutputType result = new JoinCoauthoringRequest.OutputType();
result.Lock = LockType.SchemaLock;
result.CoauthStatus = CoauthStatusType.Alone;
result.TransitionId = Guid.NewGuid();
return result;
}
public override ExitCoauthoringRequest.OutputType HandleExitCoauthoring(ExitCoauthoringRequest.InputType input, int protocolMajorVersion, int protocolMinorVersion)
{
ExitCoauthoringRequest.OutputType result = new ExitCoauthoringRequest.OutputType();
return result;
}
public override RefreshCoauthoringSessionRequest.OutputType HandleRefreshCoauthoring(RefreshCoauthoringSessionRequest.InputType input, int protocolMajorVersion, int protocolMinorVersion)
{
RefreshCoauthoringSessionRequest.OutputType result = new RefreshCoauthoringSessionRequest.OutputType();
result.Lock = LockType.SchemaLock;
result.CoauthStatus = CoauthStatusType.Alone;
return result;
}
public override ConvertCoauthLockToExclusiveLockRequest.OutputType HandleConvertCoauthLockToExclusiveLock(ConvertCoauthLockToExclusiveLockRequest.InputType input)
{
ConvertCoauthLockToExclusiveLockRequest.OutputType result = new ConvertCoauthLockToExclusiveLockRequest.OutputType();
return result;
}
public override CheckCoauthLockAvailabilityRequest.OutputType HandleCheckCoauthLockAvailability(CheckCoauthLockAvailabilityRequest.InputType input)
{
CheckCoauthLockAvailabilityRequest.OutputType result = new CheckCoauthLockAvailabilityRequest.OutputType();
return result;
}
public override MarkCoauthTransitionCompleteRequest.OutputType HandleMarkCoauthTransitionComplete(MarkCoauthTransitionCompleteRequest.InputType input)
{
MarkCoauthTransitionCompleteRequest.OutputType result = new MarkCoauthTransitionCompleteRequest.OutputType();
return result;
}
public override GetCoauthoringStatusRequest.OutputType HandleGetCoauthoringStatus(GetCoauthoringStatusRequest.InputType input)
{
GetCoauthoringStatusRequest.OutputType result = new GetCoauthoringStatusRequest.OutputType();
result.CoauthStatus = CoauthStatusType.Alone;
return result;
}
public override Dictionary<string, EditorsTableEntry> QueryEditorsTable()
{
return new Dictionary<string, EditorsTableEntry>();
}
public override JoinEditingSessionRequest.OutputType HandleJoinEditingSession(JoinEditingSessionRequest.InputType input)
{
JoinEditingSessionRequest.OutputType result = new JoinEditingSessionRequest.OutputType();
return result;
}
public override RefreshEditingSessionRequest.OutputType HandleRefreshEditingSession(RefreshEditingSessionRequest.InputType input)
{
RefreshEditingSessionRequest.OutputType result = new RefreshEditingSessionRequest.OutputType();
return result;
}
public override LeaveEditingSessionRequest.OutputType HandleLeaveEditingSession(LeaveEditingSessionRequest.InputType input)
{
LeaveEditingSessionRequest.OutputType result = new LeaveEditingSessionRequest.OutputType();
return result;
}
public override UpdateEditorMetadataRequest.OutputType HandleUpdateEditorMetadata(UpdateEditorMetadataRequest.InputType input)
{
UpdateEditorMetadataRequest.OutputType result = new UpdateEditorMetadataRequest.OutputType();
return result;
}
public override RemoveEditorMetadataRequest.OutputType HandleRemoveEditorMetadata(RemoveEditorMetadataRequest.InputType input)
{
RemoveEditorMetadataRequest.OutputType result = new RemoveEditorMetadataRequest.OutputType();
return result;
}
public override ulong GetEditorsTableWaterline()
{
return 0;
}
public override AmIAloneRequest.OutputType HandleAmIAlone(AmIAloneRequest.InputType input)
{
AmIAloneRequest.OutputType result = new AmIAloneRequest.OutputType();
result.AmIAlone = true;
return result;
}
public override DocMetaInfoRequest.OutputType HandleDocMetaInfo(DocMetaInfoRequest.InputType input)
{
DocMetaInfoRequest.OutputType result = new DocMetaInfoRequest.OutputType();
return result;
}
public override VersionsRequest.OutputType HandleVersions(VersionsRequest.InputType input)
{
VersionsRequest.OutputType result = new VersionsRequest.OutputType();
result.Enabled = false;
return result;
}
}
}

View file

@ -0,0 +1,101 @@
using System;
using System.IO;
using System.Threading;
using Cobalt;
using log4net;
using WebsitePanel.WebDav.Core.Interfaces.Managers;
using WebsitePanel.WebDav.Core.Interfaces.Owa;
namespace WebsitePanel.WebDav.Core.Owa
{
public class CobaltManager : ICobaltManager
{
private readonly IWebDavManager _webDavManager;
private readonly IWopiFileManager _fileManager;
private readonly IAccessTokenManager _tokenManager;
private readonly ILog Log;
public CobaltManager(IWebDavManager webDavManager, IWopiFileManager fileManager,
IAccessTokenManager tokenManager)
{
_webDavManager = webDavManager;
_fileManager = fileManager;
_tokenManager = tokenManager;
Log = LogManager.GetLogger(this.GetType());
}
public Atom ProcessRequest(int accessTokenId, Stream requestStream)
{
var token = _tokenManager.GetToken(accessTokenId);
var atomRequest = new AtomFromStream(requestStream);
var requestBatch = new RequestBatch();
try
{
var cobaltFile = _fileManager.Get(token.FilePath) ?? _fileManager.Create(accessTokenId);
Object ctx;
ProtocolVersion protocolVersion;
requestBatch.DeserializeInputFromProtocol(atomRequest, out ctx, out protocolVersion);
cobaltFile.CobaltEndpoint.ExecuteRequestBatch(requestBatch);
foreach (var request in requestBatch.Requests)
{
if (request.GetType() == typeof (PutChangesRequest) &&
request.PartitionId == FilePartitionId.Content && request.CompletedSuccessfully)
{
using (var saveStream = new MemoryStream())
{
CopyStream(cobaltFile, saveStream);
_webDavManager.UploadFile(token.FilePath, saveStream.ToArray());
}
}
}
return requestBatch.SerializeOutputToProtocol(protocolVersion);
}
catch (Exception e)
{
Log.Error("Cobalt manager Process request", e);
throw;
}
}
private void CopyStream(CobaltFile file, Stream stream)
{
var tries = 3;
for (int i = 0; i < tries; i++)
{
try
{
GenericFdaStream myCobaltStream = new GenericFda(file.CobaltEndpoint, null).GetContentStream();
myCobaltStream.CopyTo(stream);
break;
}
catch (Exception)
{
//unable to read update - save failed
if (i == tries - 1)
{
throw;
}
//waiting for cobalt completion
Thread.Sleep(50);
}
}
}
}
}

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