From 41a540bd1ef490a355757cd31b57d3816237ca83 Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Fri, 16 Jan 2015 00:38:07 -0800 Subject: [PATCH 01/11] bugs fix --- ...DavExplorerConfigurationSettingsSection.cs | 8 + .../WebConfigSections/WebdavRootElement.cs | 21 +++ .../Config/WebDavAppConfigManager.cs | 5 + .../Interfaces/Managers/IWebDavManager.cs | 12 +- .../Managers/WebDavManager.cs | 168 ++++++++++-------- .../Owa/WopiServer.cs | 16 +- .../FormsAuthenticationService.cs | 9 +- .../WebsitePanel.WebDav.Core.csproj | 8 +- .../Controllers/AccountController.cs | 4 +- .../Controllers/FileSystemController.cs | 22 +-- .../DependencyInjection/PortalDependencies.cs | 3 +- .../Scripts/appScripts/uploadingData2.js | 2 +- .../WebsitePanel.WebDavPortal/Web.config | 1 + 13 files changed, 165 insertions(+), 114 deletions(-) create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebdavRootElement.cs diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebDavExplorerConfigurationSettingsSection.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebDavExplorerConfigurationSettingsSection.cs index af4e472e..1849b692 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebDavExplorerConfigurationSettingsSection.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebDavExplorerConfigurationSettingsSection.cs @@ -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"; @@ -25,6 +26,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 { diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebdavRootElement.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebdavRootElement.cs new file mode 100644 index 00000000..2e6d1222 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebdavRootElement.cs @@ -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; } + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebDavAppConfigManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebDavAppConfigManager.cs index cd28a090..01eebf42 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebDavAppConfigManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebDavAppConfigManager.cs @@ -30,6 +30,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; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/IWebDavManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/IWebDavManager.cs index f3900c88..abbbaad0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/IWebDavManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/IWebDavManager.cs @@ -5,13 +5,11 @@ namespace WebsitePanel.WebDav.Core.Interfaces.Managers { public interface IWebDavManager { - string RootPath { get; } - void OpenFolder(string pathPart); - IEnumerable GetChildren(); - bool IsFile(string fileName); - byte[] GetFileBytes(string fileName); - IResource GetResource( string fileName); - string GetFileUrl(string fileName); + IEnumerable OpenFolder(string path); + bool IsFile(string path); + byte[] GetFileBytes(string path); + IResource GetResource(string path); + string GetFileUrl(string path); string CreateFileId(string path); string FilePathFromId(string id); diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/WebDavManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/WebDavManager.cs index 05a7d69f..f6e43bd7 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/WebDavManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/WebDavManager.cs @@ -21,16 +21,8 @@ namespace WebsitePanel.WebDav.Core.Managers private readonly ILog Log; - private IFolder _currentFolder; private bool _isRoot = true; - - private Lazy> _rootFolders; - private Lazy _webDavRootPath; - - public string RootPath - { - get { return _webDavRootPath.Value; } - } + private IFolder _currentFolder; public WebDavManager(ICryptography cryptography) { @@ -38,49 +30,29 @@ namespace WebsitePanel.WebDav.Core.Managers Log = LogManager.GetLogger(this.GetType()); _webDavSession = new WebDavSession(); - - _rootFolders = new Lazy>(ConnectToWebDavServer); - _webDavRootPath = new Lazy(() => - { - if (_rootFolders.Value.Any()) - { - var folder = _rootFolders.Value.First(); - var uri = new Uri(folder.Url); - return uri.Scheme + "://" + uri.Host + uri.Segments[0] + uri.Segments[1]; - } - - return string.Empty; - }); - } - public void OpenFolder(string pathPart) - { - if (string.IsNullOrWhiteSpace(pathPart)) - { - _isRoot = true; - return; - } - - _isRoot = false; - - _webDavSession.Credentials = new NetworkCredential(WspContext.User.Login, _cryptography.Decrypt(WspContext.User.EncryptedPassword), WebDavAppConfigManager.Instance.UserDomain); - - _currentFolder = _webDavSession.OpenFolder(_webDavRootPath.Value + pathPart); - } - - public IEnumerable GetChildren() + public IEnumerable OpenFolder(string pathPart) { IHierarchyItem[] children; - if (_isRoot) + if (string.IsNullOrWhiteSpace(pathPart)) { - children = _rootFolders.Value.Select(x => new WebDavHierarchyItem {Href = new Uri(x.Url), ItemType = ItemType.Folder}).ToArray(); + children = ConnectToWebDavServer().Select(x => new WebDavHierarchyItem { Href = new Uri(x.Url), ItemType = ItemType.Folder }).ToArray(); } 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)); + } + children = _currentFolder.GetChildren(); - } + } List 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)); @@ -88,30 +60,40 @@ namespace WebsitePanel.WebDav.Core.Managers return sortedChildren; } - public bool IsFile(string fileName) + public bool IsFile(string path) { - if (string.IsNullOrWhiteSpace(fileName) | _currentFolder == null) - return false; + string folder = GetFileFolder(path); - try + if (string.IsNullOrWhiteSpace(folder)) { - IResource resource = _currentFolder.GetResource(fileName); - //Stream stream = resource.GetReadStream(); - return true; + return false; } - catch (InvalidOperationException) - { - } - return false; + + var resourceName = GetResourceName(path); + + OpenFolder(folder); + + IResource resource = _currentFolder.GetResource(resourceName); + + return resource.ItemType == ItemType.Resource; } - public byte[] GetFileBytes(string fileName) + + public byte[] GetFileBytes(string path) { try { - IResource resource = _currentFolder.GetResource(fileName); + 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) @@ -120,12 +102,17 @@ namespace WebsitePanel.WebDav.Core.Managers } } - public IResource GetResource(string fileName) + public IResource GetResource(string path) { try { - IResource resource = _currentFolder.GetResource(fileName); - return resource; + string folder = GetFileFolder(path); + + var resourceName = GetResourceName(path); + + OpenFolder(folder); + + return _currentFolder.GetResource(resourceName); } catch (InvalidOperationException exception) { @@ -133,11 +120,17 @@ namespace WebsitePanel.WebDav.Core.Managers } } - public string GetFileUrl(string fileName) + public string GetFileUrl(string path) { try { - IResource resource = _currentFolder.GetResource(fileName); + string folder = GetFileFolder(path); + + var resourceName = GetResourceName(path); + + OpenFolder(folder); + + IResource resource = _currentFolder.GetResource(resourceName); return resource.Href.ToString(); } catch (InvalidOperationException exception) @@ -171,19 +164,6 @@ namespace WebsitePanel.WebDav.Core.Managers return rootFolders; } - 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 string CreateFileId(string path) { return _cryptography.Encrypt(path).Replace("/", "AAAAA"); @@ -193,5 +173,45 @@ namespace WebsitePanel.WebDav.Core.Managers { return _cryptography.Decrypt(id.Replace("AAAAA", "/")); } + + #region Helpers + + 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(); + } + } + + private string GetFileFolder(string path) + { + if (string.IsNullOrEmpty(path) || !path.Contains('/')) + { + return string.Empty; + } + + string fileName = path.Split('/').Last(); + int index = path.LastIndexOf(fileName, StringComparison.InvariantCultureIgnoreCase); + string folder = path.Remove(index - 1, fileName.Length + 1); + + return folder; + } + + private string GetResourceName(string path) + { + if (string.IsNullOrEmpty(path) || !path.Contains('/')) + { + return string.Empty; + } + + return path.Split('/').Last(); ; + } + + #endregion } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Owa/WopiServer.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Owa/WopiServer.cs index 7f646f02..c55f3e53 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Owa/WopiServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Owa/WopiServer.cs @@ -23,13 +23,7 @@ namespace WebsitePanel.WebDav.Core.Owa public CheckFileInfo GetCheckFileInfo(string path) { - string fileName = path.Split('/').Last(); - int index = path.LastIndexOf(fileName, StringComparison.InvariantCultureIgnoreCase); - string folder = path.Remove(index - 1, fileName.Length + 1); - - _webDavManager.OpenFolder(folder); - - var resource = _webDavManager.GetResource(fileName); + var resource = _webDavManager.GetResource(path); var cFileInfo = new CheckFileInfo { @@ -44,13 +38,7 @@ namespace WebsitePanel.WebDav.Core.Owa public FileResult GetFile(string path) { - string fileName = path.Split('/').Last(); - int index = path.LastIndexOf(fileName, StringComparison.InvariantCultureIgnoreCase); - string folder = path.Remove(index - 1, fileName.Length + 1); - - _webDavManager.OpenFolder(folder); - - var fileBytes = _webDavManager.GetFileBytes(fileName); + var fileBytes = _webDavManager.GetFileBytes(path); return new FileContentResult(fileBytes, MediaTypeNames.Application.Octet); } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Security/Authentication/FormsAuthenticationService.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Security/Authentication/FormsAuthenticationService.cs index bf1cdec0..05c523fa 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Security/Authentication/FormsAuthenticationService.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Security/Authentication/FormsAuthenticationService.cs @@ -25,12 +25,17 @@ namespace WebsitePanel.WebDav.Core.Security.Authentication public WspPrincipal LogIn(string login, string password) { - if (_principalContext.ValidateCredentials(login, password) == false) + if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password)) { return null; } - //var user = UserPrincipal.FindByIdentity(_principalContext, IdentityType.UserPrincipalName, login); + var user = UserPrincipal.FindByIdentity(_principalContext, IdentityType.UserPrincipalName, login); + + if (_principalContext.ValidateCredentials(login, password) == false && user != null) + { + return null; + } var principal = new WspPrincipal(login); diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj index 9823dce5..8f0667be 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj @@ -45,6 +45,7 @@ True + @@ -83,9 +84,8 @@ - - False - ..\..\..\..\Scheduler Domains\WebsitePanel\Bin\WebsitePanel.EnterpriseServer.Base.dll + + ..\WebsitePanel.WebPortal\Bin\WebsitePanel.EnterpriseServer.Base.dll ..\WebsitePanel.WebPortal\Bin\WebsitePanel.EnterpriseServer.Client.dll @@ -114,6 +114,7 @@ + @@ -155,6 +156,7 @@ + diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/AccountController.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/AccountController.cs index b63ff4dd..d26d43ee 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/AccountController.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/AccountController.cs @@ -40,9 +40,9 @@ namespace WebsitePanel.WebDavPortal.Controllers { var user = _authenticationService.LogIn(model.Login, model.Password); - ViewBag.LdapIsAuthentication = user.Identity.IsAuthenticated; + ViewBag.LdapIsAuthentication = user != null; - if (user.Identity.IsAuthenticated) + if (user != null && user.Identity.IsAuthenticated) { _authenticationService.CreateAuthenticationTicket(user); diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs index f2411e82..a18452a9 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs @@ -41,19 +41,21 @@ namespace WebsitePanel.WebDavPortal.Controllers public ActionResult ShowContent(string org, string pathPart = "") { if (org != WspContext.User.OrganizationId) - return new HttpStatusCodeResult(HttpStatusCode.NoContent); - - string fileName = pathPart.Split('/').Last(); - if (_webdavManager.IsFile(fileName)) { - var fileBytes = _webdavManager.GetFileBytes(fileName); + return new HttpStatusCodeResult(HttpStatusCode.NoContent); + } + + string fileName = pathPart.Split('/').Last(); + + if (_webdavManager.IsFile(pathPart)) + { + var fileBytes = _webdavManager.GetFileBytes(pathPart); return File(fileBytes, MediaTypeNames.Application.Octet, fileName); } try { - _webdavManager.OpenFolder(pathPart); - IEnumerable children = _webdavManager.GetChildren().Where(x => !WebDavAppConfigManager.Instance.ElementsRendering.ElementsToIgnore.Contains(x.DisplayName.Trim('/'))); + IEnumerable children = _webdavManager.OpenFolder(pathPart).Where(x => !WebDavAppConfigManager.Instance.ElementsRendering.ElementsToIgnore.Contains(x.DisplayName.Trim('/'))); var model = new ModelForWebDav { Items = children.Take(WebDavAppConfigManager.Instance.ElementsRendering.DefaultCount), UrlSuffix = pathPart }; Session[WebDavAppConfigManager.Instance.SessionKeys.ResourseRenderCount] = WebDavAppConfigManager.Instance.ElementsRendering.DefaultCount; @@ -70,7 +72,7 @@ namespace WebsitePanel.WebDavPortal.Controllers { var owaOpener = WebDavAppConfigManager.Instance.OfficeOnline.Single(x => x.Extension == Path.GetExtension(pathPart)); - string fileUrl = _webdavManager.RootPath.TrimEnd('/') + "/" + pathPart.TrimStart('/'); + string fileUrl = WebDavAppConfigManager.Instance.WebdavRoot+ org + "/" + pathPart.TrimStart('/'); string accessToken = _authenticationService.CreateAccessToken(WspContext.User); string wopiSrc = Server.UrlDecode(Url.RouteUrl(OwaRouteNames.CheckFileInfo, new { encodedPath = _webdavManager.CreateFileId(pathPart) }, Request.Url.Scheme)); @@ -81,13 +83,13 @@ namespace WebsitePanel.WebDavPortal.Controllers } [HttpPost] - public ActionResult ShowAdditionalContent() + public ActionResult ShowAdditionalContent(string path) { if (Session[WebDavAppConfigManager.Instance.SessionKeys.ResourseRenderCount] != null) { var renderedElementsCount = (int)Session[WebDavAppConfigManager.Instance.SessionKeys.ResourseRenderCount]; - IEnumerable children = _webdavManager.GetChildren(); + IEnumerable children = _webdavManager.OpenFolder(path); var result = children.Skip(renderedElementsCount).Take(WebDavAppConfigManager.Instance.ElementsRendering.AddElementsCount); diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/PortalDependencies.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/PortalDependencies.cs index c6031ca0..12c1cc62 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/PortalDependencies.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/PortalDependencies.cs @@ -7,6 +7,7 @@ using System.Web.SessionState; using WebsitePanel.WebDav.Core.Interfaces.Managers; using WebsitePanel.WebDav.Core.Interfaces.Owa; using WebsitePanel.WebDav.Core.Interfaces.Security; +using WebsitePanel.WebDav.Core.Managers; using WebsitePanel.WebDav.Core.Owa; using WebsitePanel.WebDav.Core.Security; using WebsitePanel.WebDav.Core.Security.Authentication; @@ -23,7 +24,7 @@ namespace WebsitePanel.WebDavPortal.DependencyInjection kernel.Bind().ToProvider(); kernel.Bind().To(); kernel.Bind().To(); - kernel.Bind().ToProvider(); + kernel.Bind().To(); kernel.Bind().To(); } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/appScripts/uploadingData2.js b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/appScripts/uploadingData2.js index 7988b483..cd9dd1d2 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/appScripts/uploadingData2.js +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/appScripts/uploadingData2.js @@ -15,7 +15,7 @@ function GetResources() { $.ajax({ type: 'POST', url: '/FileSystem/ShowAdditionalContent', - data: '', + data: { path: window.location.pathname }, dataType: "html", success: function (result) { var domElement = $(result); diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Web.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Web.config index ba449d53..aaabd2ca 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Web.config +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Web.config @@ -38,6 +38,7 @@ + From 213eaf0077fb0a3ab7d5e3537c6c76375e132b0d Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Fri, 16 Jan 2015 03:56:59 -0800 Subject: [PATCH 02/11] webdav portal login + access token fix --- WebsitePanel/Database/update_db.sql | 113 + .../HostedSolution/WebDavAccessToken.cs | 15 + .../WebsitePanel.EnterpriseServer.Base.csproj | 1 + .../EnterpriseStorageProxy.cs | 2222 ++++++++--------- .../Data/DataProvider.cs | 51 + .../EnterpriseStorageController.cs | 20 + .../esEnterpriseStorage.asmx.cs | 23 + .../Managers/IAccessTokenManager.cs | 14 + .../Interfaces/Managers/IWebDavManager.cs | 3 - .../Security/IAuthenticationService.cs | 3 +- .../Managers/AccessTokenManager.cs | 42 + .../Managers/WebDavManager.cs | 10 - .../FormsAuthenticationService.cs | 26 +- .../Authentication/Principals/WspPrincipal.cs | 3 +- .../WebsitePanel.WebDav.Core.csproj | 2 + .../App_Start/RouteConfig.cs | 4 +- .../Controllers/FileSystemController.cs | 10 +- .../Controllers/OwaController.cs | 49 +- .../DependencyInjection/PortalDependencies.cs | 1 + 19 files changed, 1431 insertions(+), 1181 deletions(-) create mode 100644 WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/HostedSolution/WebDavAccessToken.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/IAccessTokenManager.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/AccessTokenManager.cs diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index a68e2c13..80ffdb8a 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -7566,3 +7566,116 @@ COMMIT TRAN RETURN GO + + +-- WebDAv portal + +IF EXISTS (SELECT * FROM SYS.TABLES WHERE name = 'WebDavAccessTokens') +DROP TABLE WebDavAccessTokens +GO +CREATE TABLE WebDavAccessTokens +( + ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY, + FilePath NVARCHAR(MAX) NOT NULL, + AuthData NVARCHAR(MAX) NOT NULL, + AccessToken UNIQUEIDENTIFIER NOT NULL, + ExpirationDate DATETIME NOT NULL, + AccountID INT NOT NULL , + ItemId INT NOT NULL +) +GO + +ALTER TABLE [dbo].[WebDavAccessTokens] WITH CHECK ADD CONSTRAINT [FK_WebDavAccessTokens_UserId] FOREIGN KEY([AccountID]) +REFERENCES [dbo].[ExchangeAccounts] ([AccountID]) +ON DELETE CASCADE +GO + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddWebDavAccessToken') +DROP PROCEDURE AddWebDavAccessToken +GO +CREATE PROCEDURE [dbo].[AddWebDavAccessToken] +( + @TokenID INT OUTPUT, + @FilePath NVARCHAR(MAX), + @AccessToken UNIQUEIDENTIFIER, + @AuthData NVARCHAR(MAX), + @ExpirationDate DATETIME, + @AccountID INT, + @ItemId INT +) +AS +INSERT INTO WebDavAccessTokens +( + FilePath, + AccessToken, + AuthData, + ExpirationDate, + AccountID , + ItemId +) +VALUES +( + @FilePath , + @AccessToken , + @AuthData, + @ExpirationDate , + @AccountID, + @ItemId +) + +SET @TokenID = SCOPE_IDENTITY() + +RETURN +GO + + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'DeleteExpiredWebDavAccessTokens') +DROP PROCEDURE DeleteExpiredWebDavAccessTokens +GO +CREATE PROCEDURE [dbo].[DeleteExpiredWebDavAccessTokens] +AS +DELETE FROM WebDavAccessTokens +WHERE ExpirationDate < getdate() +GO + + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetWebDavAccessTokenById') +DROP PROCEDURE GetWebDavAccessTokenById +GO +CREATE PROCEDURE [dbo].[GetWebDavAccessTokenById] +( + @Id int +) +AS +SELECT + ID , + FilePath , + AuthData , + AccessToken, + ExpirationDate, + AccountID, + ItemId + FROM WebDavAccessTokens + Where ID = @Id AND ExpirationDate > getdate() +GO + + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetWebDavAccessTokenByAccessToken') +DROP PROCEDURE GetWebDavAccessTokenByAccessToken +GO +CREATE PROCEDURE [dbo].[GetWebDavAccessTokenByAccessToken] +( + @AccessToken UNIQUEIDENTIFIER +) +AS +SELECT + ID , + FilePath , + AuthData , + AccessToken, + ExpirationDate, + AccountID, + ItemId + FROM WebDavAccessTokens + Where AccessToken = @AccessToken AND ExpirationDate > getdate() +GO \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/HostedSolution/WebDavAccessToken.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/HostedSolution/WebDavAccessToken.cs new file mode 100644 index 00000000..9d6cd92d --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/HostedSolution/WebDavAccessToken.cs @@ -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; } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj index c4c1bc7a..63f2d7cd 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj @@ -120,6 +120,7 @@ + diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/EnterpriseStorageProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/EnterpriseStorageProxy.cs index 76e6772c..7300cf58 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/EnterpriseStorageProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/EnterpriseStorageProxy.cs @@ -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. - //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4984 +// Runtime Version:2.0.50727.7905 // // 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.42. +// This source code was auto-generated by wsdl, Version=2.0.50727.3038. // using WebsitePanel.EnterpriseServer.Base.HostedSolution; @@ -46,2011 +18,2009 @@ using WebsitePanel.Providers.Common; using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.OS; -namespace WebsitePanel.EnterpriseServer -{ +namespace WebsitePanel.EnterpriseServer { + using System.Xml.Serialization; + using System.Web.Services; + using System.ComponentModel; + using System.Web.Services.Protocols; + using System; + using System.Diagnostics; + + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Web.Services.WebServiceBindingAttribute(Name = "esEnterpriseStorageSoap", Namespace = "http://smbsaas/websitepanel/enterpriseserver")] + [System.Web.Services.WebServiceBindingAttribute(Name="esEnterpriseStorageSoap", Namespace="http://smbsaas/websitepanel/enterpriseserver")] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))] - public partial class esEnterpriseStorage : Microsoft.Web.Services3.WebServicesClientProtocol - { + public partial class esEnterpriseStorage : Microsoft.Web.Services3.WebServicesClientProtocol { + + private System.Threading.SendOrPostCallback AddWebDavAccessTokenOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteExpiredWebDavAccessTokensOperationCompleted; + + private System.Threading.SendOrPostCallback GetWebDavAccessTokenByIdOperationCompleted; + + private System.Threading.SendOrPostCallback GetWebDavAccessTokenByAccessTokenOperationCompleted; + private System.Threading.SendOrPostCallback CheckFileServicesInstallationOperationCompleted; - + private System.Threading.SendOrPostCallback GetEnterpriseFoldersOperationCompleted; - + private System.Threading.SendOrPostCallback GetEnterpriseFolderOperationCompleted; - + private System.Threading.SendOrPostCallback CreateEnterpriseFolderOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteEnterpriseFolderOperationCompleted; - + private System.Threading.SendOrPostCallback GetEnterpriseFolderPermissionsOperationCompleted; - + private System.Threading.SendOrPostCallback SetEnterpriseFolderPermissionsOperationCompleted; - + private System.Threading.SendOrPostCallback SearchESAccountsOperationCompleted; - + private System.Threading.SendOrPostCallback GetEnterpriseFoldersPagedOperationCompleted; - + private System.Threading.SendOrPostCallback RenameEnterpriseFolderOperationCompleted; - + private System.Threading.SendOrPostCallback CreateEnterpriseStorageOperationCompleted; - + private System.Threading.SendOrPostCallback CheckEnterpriseStorageInitializationOperationCompleted; - + private System.Threading.SendOrPostCallback CheckUsersDomainExistsOperationCompleted; - + private System.Threading.SendOrPostCallback GetDirectoryBrowseEnabledOperationCompleted; - + private System.Threading.SendOrPostCallback SetDirectoryBrowseEnabledOperationCompleted; - + private System.Threading.SendOrPostCallback SetEnterpriseFolderSettingsOperationCompleted; - + private System.Threading.SendOrPostCallback GetStatisticsOperationCompleted; - + private System.Threading.SendOrPostCallback GetStatisticsByOrganizationOperationCompleted; - + private System.Threading.SendOrPostCallback CreateMappedDriveOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteMappedDriveOperationCompleted; - + private System.Threading.SendOrPostCallback GetDriveMapsPagedOperationCompleted; - + private System.Threading.SendOrPostCallback GetUsedDriveLettersOperationCompleted; - + private System.Threading.SendOrPostCallback GetNotMappedEnterpriseFoldersOperationCompleted; - + /// - public esEnterpriseStorage() - { + public esEnterpriseStorage() { this.Url = "http://localhost:9002/esEnterpriseStorage.asmx"; } - + + /// + public event AddWebDavAccessTokenCompletedEventHandler AddWebDavAccessTokenCompleted; + + /// + public event DeleteExpiredWebDavAccessTokensCompletedEventHandler DeleteExpiredWebDavAccessTokensCompleted; + + /// + public event GetWebDavAccessTokenByIdCompletedEventHandler GetWebDavAccessTokenByIdCompleted; + + /// + public event GetWebDavAccessTokenByAccessTokenCompletedEventHandler GetWebDavAccessTokenByAccessTokenCompleted; + /// public event CheckFileServicesInstallationCompletedEventHandler CheckFileServicesInstallationCompleted; - + /// public event GetEnterpriseFoldersCompletedEventHandler GetEnterpriseFoldersCompleted; - + /// public event GetEnterpriseFolderCompletedEventHandler GetEnterpriseFolderCompleted; - + /// public event CreateEnterpriseFolderCompletedEventHandler CreateEnterpriseFolderCompleted; - + /// public event DeleteEnterpriseFolderCompletedEventHandler DeleteEnterpriseFolderCompleted; - + /// public event GetEnterpriseFolderPermissionsCompletedEventHandler GetEnterpriseFolderPermissionsCompleted; - + /// public event SetEnterpriseFolderPermissionsCompletedEventHandler SetEnterpriseFolderPermissionsCompleted; - + /// public event SearchESAccountsCompletedEventHandler SearchESAccountsCompleted; - + /// public event GetEnterpriseFoldersPagedCompletedEventHandler GetEnterpriseFoldersPagedCompleted; - + /// public event RenameEnterpriseFolderCompletedEventHandler RenameEnterpriseFolderCompleted; - + /// public event CreateEnterpriseStorageCompletedEventHandler CreateEnterpriseStorageCompleted; - + /// public event CheckEnterpriseStorageInitializationCompletedEventHandler CheckEnterpriseStorageInitializationCompleted; - + /// public event CheckUsersDomainExistsCompletedEventHandler CheckUsersDomainExistsCompleted; - + /// public event GetDirectoryBrowseEnabledCompletedEventHandler GetDirectoryBrowseEnabledCompleted; - + /// public event SetDirectoryBrowseEnabledCompletedEventHandler SetDirectoryBrowseEnabledCompleted; - + /// public event SetEnterpriseFolderSettingsCompletedEventHandler SetEnterpriseFolderSettingsCompleted; - + /// public event GetStatisticsCompletedEventHandler GetStatisticsCompleted; - + /// public event GetStatisticsByOrganizationCompletedEventHandler GetStatisticsByOrganizationCompleted; - + /// public event CreateMappedDriveCompletedEventHandler CreateMappedDriveCompleted; - + /// public event DeleteMappedDriveCompletedEventHandler DeleteMappedDriveCompleted; - + /// public event GetDriveMapsPagedCompletedEventHandler GetDriveMapsPagedCompleted; - + /// public event GetUsedDriveLettersCompletedEventHandler GetUsedDriveLettersCompleted; - + /// public event GetNotMappedEnterpriseFoldersCompletedEventHandler GetNotMappedEnterpriseFoldersCompleted; - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CheckFileServicesInstallation", 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 CheckFileServicesInstallation(int serviceId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddWebDavAccessToken", 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 AddWebDavAccessToken(WebDavAccessToken accessToken) { + object[] results = this.Invoke("AddWebDavAccessToken", new object[] { + accessToken}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginAddWebDavAccessToken(WebDavAccessToken accessToken, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("AddWebDavAccessToken", new object[] { + accessToken}, callback, asyncState); + } + + /// + public int EndAddWebDavAccessToken(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void AddWebDavAccessTokenAsync(WebDavAccessToken accessToken) { + this.AddWebDavAccessTokenAsync(accessToken, null); + } + + /// + public void AddWebDavAccessTokenAsync(WebDavAccessToken accessToken, object userState) { + if ((this.AddWebDavAccessTokenOperationCompleted == null)) { + this.AddWebDavAccessTokenOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddWebDavAccessTokenOperationCompleted); + } + this.InvokeAsync("AddWebDavAccessToken", new object[] { + accessToken}, this.AddWebDavAccessTokenOperationCompleted, userState); + } + + private void OnAddWebDavAccessTokenOperationCompleted(object arg) { + if ((this.AddWebDavAccessTokenCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.AddWebDavAccessTokenCompleted(this, new AddWebDavAccessTokenCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteExpiredWebDavAccessTokens", 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 void DeleteExpiredWebDavAccessTokens() { + this.Invoke("DeleteExpiredWebDavAccessTokens", new object[0]); + } + + /// + public System.IAsyncResult BeginDeleteExpiredWebDavAccessTokens(System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("DeleteExpiredWebDavAccessTokens", new object[0], callback, asyncState); + } + + /// + public void EndDeleteExpiredWebDavAccessTokens(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void DeleteExpiredWebDavAccessTokensAsync() { + this.DeleteExpiredWebDavAccessTokensAsync(null); + } + + /// + public void DeleteExpiredWebDavAccessTokensAsync(object userState) { + if ((this.DeleteExpiredWebDavAccessTokensOperationCompleted == null)) { + this.DeleteExpiredWebDavAccessTokensOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteExpiredWebDavAccessTokensOperationCompleted); + } + this.InvokeAsync("DeleteExpiredWebDavAccessTokens", new object[0], this.DeleteExpiredWebDavAccessTokensOperationCompleted, userState); + } + + private void OnDeleteExpiredWebDavAccessTokensOperationCompleted(object arg) { + if ((this.DeleteExpiredWebDavAccessTokensCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeleteExpiredWebDavAccessTokensCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWebDavAccessTokenById", 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 WebDavAccessToken GetWebDavAccessTokenById(int id) { + object[] results = this.Invoke("GetWebDavAccessTokenById", new object[] { + id}); + return ((WebDavAccessToken)(results[0])); + } + + /// + public System.IAsyncResult BeginGetWebDavAccessTokenById(int id, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetWebDavAccessTokenById", new object[] { + id}, callback, asyncState); + } + + /// + public WebDavAccessToken EndGetWebDavAccessTokenById(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((WebDavAccessToken)(results[0])); + } + + /// + public void GetWebDavAccessTokenByIdAsync(int id) { + this.GetWebDavAccessTokenByIdAsync(id, null); + } + + /// + public void GetWebDavAccessTokenByIdAsync(int id, object userState) { + if ((this.GetWebDavAccessTokenByIdOperationCompleted == null)) { + this.GetWebDavAccessTokenByIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWebDavAccessTokenByIdOperationCompleted); + } + this.InvokeAsync("GetWebDavAccessTokenById", new object[] { + id}, this.GetWebDavAccessTokenByIdOperationCompleted, userState); + } + + private void OnGetWebDavAccessTokenByIdOperationCompleted(object arg) { + if ((this.GetWebDavAccessTokenByIdCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetWebDavAccessTokenByIdCompleted(this, new GetWebDavAccessTokenByIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWebDavAccessTokenByAccessToken", 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 WebDavAccessToken GetWebDavAccessTokenByAccessToken(System.Guid accessToken) { + object[] results = this.Invoke("GetWebDavAccessTokenByAccessToken", new object[] { + accessToken}); + return ((WebDavAccessToken)(results[0])); + } + + /// + public System.IAsyncResult BeginGetWebDavAccessTokenByAccessToken(System.Guid accessToken, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetWebDavAccessTokenByAccessToken", new object[] { + accessToken}, callback, asyncState); + } + + /// + public WebDavAccessToken EndGetWebDavAccessTokenByAccessToken(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((WebDavAccessToken)(results[0])); + } + + /// + public void GetWebDavAccessTokenByAccessTokenAsync(System.Guid accessToken) { + this.GetWebDavAccessTokenByAccessTokenAsync(accessToken, null); + } + + /// + public void GetWebDavAccessTokenByAccessTokenAsync(System.Guid accessToken, object userState) { + if ((this.GetWebDavAccessTokenByAccessTokenOperationCompleted == null)) { + this.GetWebDavAccessTokenByAccessTokenOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWebDavAccessTokenByAccessTokenOperationCompleted); + } + this.InvokeAsync("GetWebDavAccessTokenByAccessToken", new object[] { + accessToken}, this.GetWebDavAccessTokenByAccessTokenOperationCompleted, userState); + } + + private void OnGetWebDavAccessTokenByAccessTokenOperationCompleted(object arg) { + if ((this.GetWebDavAccessTokenByAccessTokenCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetWebDavAccessTokenByAccessTokenCompleted(this, new GetWebDavAccessTokenByAccessTokenCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CheckFileServicesInstallation", 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 CheckFileServicesInstallation(int serviceId) { object[] results = this.Invoke("CheckFileServicesInstallation", new object[] { - serviceId}); + serviceId}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginCheckFileServicesInstallation(int serviceId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCheckFileServicesInstallation(int serviceId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CheckFileServicesInstallation", new object[] { - serviceId}, callback, asyncState); + serviceId}, callback, asyncState); } - + /// - public bool EndCheckFileServicesInstallation(System.IAsyncResult asyncResult) - { + public bool EndCheckFileServicesInstallation(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void CheckFileServicesInstallationAsync(int serviceId) - { + public void CheckFileServicesInstallationAsync(int serviceId) { this.CheckFileServicesInstallationAsync(serviceId, null); } - + /// - public void CheckFileServicesInstallationAsync(int serviceId, object userState) - { - if ((this.CheckFileServicesInstallationOperationCompleted == null)) - { + public void CheckFileServicesInstallationAsync(int serviceId, object userState) { + if ((this.CheckFileServicesInstallationOperationCompleted == null)) { this.CheckFileServicesInstallationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckFileServicesInstallationOperationCompleted); } this.InvokeAsync("CheckFileServicesInstallation", new object[] { - serviceId}, this.CheckFileServicesInstallationOperationCompleted, userState); + serviceId}, this.CheckFileServicesInstallationOperationCompleted, userState); } - - private void OnCheckFileServicesInstallationOperationCompleted(object arg) - { - if ((this.CheckFileServicesInstallationCompleted != null)) - { + + private void OnCheckFileServicesInstallationOperationCompleted(object arg) { + if ((this.CheckFileServicesInstallationCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CheckFileServicesInstallationCompleted(this, new CheckFileServicesInstallationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetEnterpriseFolders", 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 SystemFile[] GetEnterpriseFolders(int itemId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetEnterpriseFolders", 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 SystemFile[] GetEnterpriseFolders(int itemId) { object[] results = this.Invoke("GetEnterpriseFolders", new object[] { - itemId}); + itemId}); return ((SystemFile[])(results[0])); } - + /// - public System.IAsyncResult BeginGetEnterpriseFolders(int itemId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetEnterpriseFolders(int itemId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetEnterpriseFolders", new object[] { - itemId}, callback, asyncState); + itemId}, callback, asyncState); } - + /// - public SystemFile[] EndGetEnterpriseFolders(System.IAsyncResult asyncResult) - { + public SystemFile[] EndGetEnterpriseFolders(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SystemFile[])(results[0])); } - + /// - public void GetEnterpriseFoldersAsync(int itemId) - { + public void GetEnterpriseFoldersAsync(int itemId) { this.GetEnterpriseFoldersAsync(itemId, null); } - + /// - public void GetEnterpriseFoldersAsync(int itemId, object userState) - { - if ((this.GetEnterpriseFoldersOperationCompleted == null)) - { + public void GetEnterpriseFoldersAsync(int itemId, object userState) { + if ((this.GetEnterpriseFoldersOperationCompleted == null)) { this.GetEnterpriseFoldersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetEnterpriseFoldersOperationCompleted); } this.InvokeAsync("GetEnterpriseFolders", new object[] { - itemId}, this.GetEnterpriseFoldersOperationCompleted, userState); + itemId}, this.GetEnterpriseFoldersOperationCompleted, userState); } - - private void OnGetEnterpriseFoldersOperationCompleted(object arg) - { - if ((this.GetEnterpriseFoldersCompleted != null)) - { + + private void OnGetEnterpriseFoldersOperationCompleted(object arg) { + if ((this.GetEnterpriseFoldersCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetEnterpriseFoldersCompleted(this, new GetEnterpriseFoldersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetEnterpriseFolder", 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 SystemFile GetEnterpriseFolder(int itemId, string folderName) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetEnterpriseFolder", 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 SystemFile GetEnterpriseFolder(int itemId, string folderName) { object[] results = this.Invoke("GetEnterpriseFolder", new object[] { - itemId, - folderName}); + itemId, + folderName}); return ((SystemFile)(results[0])); } - + /// - public System.IAsyncResult BeginGetEnterpriseFolder(int itemId, string folderName, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetEnterpriseFolder(int itemId, string folderName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetEnterpriseFolder", new object[] { - itemId, - folderName}, callback, asyncState); + itemId, + folderName}, callback, asyncState); } - + /// - public SystemFile EndGetEnterpriseFolder(System.IAsyncResult asyncResult) - { + public SystemFile EndGetEnterpriseFolder(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SystemFile)(results[0])); } - + /// - public void GetEnterpriseFolderAsync(int itemId, string folderName) - { + public void GetEnterpriseFolderAsync(int itemId, string folderName) { this.GetEnterpriseFolderAsync(itemId, folderName, null); } - + /// - public void GetEnterpriseFolderAsync(int itemId, string folderName, object userState) - { - if ((this.GetEnterpriseFolderOperationCompleted == null)) - { + public void GetEnterpriseFolderAsync(int itemId, string folderName, object userState) { + if ((this.GetEnterpriseFolderOperationCompleted == null)) { this.GetEnterpriseFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetEnterpriseFolderOperationCompleted); } this.InvokeAsync("GetEnterpriseFolder", new object[] { - itemId, - folderName}, this.GetEnterpriseFolderOperationCompleted, userState); + itemId, + folderName}, this.GetEnterpriseFolderOperationCompleted, userState); } - - private void OnGetEnterpriseFolderOperationCompleted(object arg) - { - if ((this.GetEnterpriseFolderCompleted != null)) - { + + private void OnGetEnterpriseFolderOperationCompleted(object arg) { + if ((this.GetEnterpriseFolderCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetEnterpriseFolderCompleted(this, new GetEnterpriseFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateEnterpriseFolder", 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 CreateEnterpriseFolder(int itemId, string folderName, int quota, QuotaType quotaType, bool addDefaultGroup) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateEnterpriseFolder", 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 CreateEnterpriseFolder(int itemId, string folderName, int quota, QuotaType quotaType, bool addDefaultGroup) { object[] results = this.Invoke("CreateEnterpriseFolder", new object[] { - itemId, - folderName, - quota, - quotaType, - addDefaultGroup}); + itemId, + folderName, + quota, + quotaType, + addDefaultGroup}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginCreateEnterpriseFolder(int itemId, string folderName, int quota, QuotaType quotaType, bool addDefaultGroup, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCreateEnterpriseFolder(int itemId, string folderName, int quota, QuotaType quotaType, bool addDefaultGroup, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CreateEnterpriseFolder", new object[] { - itemId, - folderName, - quota, - quotaType, - addDefaultGroup}, callback, asyncState); + itemId, + folderName, + quota, + quotaType, + addDefaultGroup}, callback, asyncState); } - + /// - public ResultObject EndCreateEnterpriseFolder(System.IAsyncResult asyncResult) - { + public ResultObject EndCreateEnterpriseFolder(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void CreateEnterpriseFolderAsync(int itemId, string folderName, int quota, QuotaType quotaType, bool addDefaultGroup) - { + public void CreateEnterpriseFolderAsync(int itemId, string folderName, int quota, QuotaType quotaType, bool addDefaultGroup) { this.CreateEnterpriseFolderAsync(itemId, folderName, quota, quotaType, addDefaultGroup, null); } - + /// - public void CreateEnterpriseFolderAsync(int itemId, string folderName, int quota, QuotaType quotaType, bool addDefaultGroup, object userState) - { - if ((this.CreateEnterpriseFolderOperationCompleted == null)) - { + public void CreateEnterpriseFolderAsync(int itemId, string folderName, int quota, QuotaType quotaType, bool addDefaultGroup, object userState) { + if ((this.CreateEnterpriseFolderOperationCompleted == null)) { this.CreateEnterpriseFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateEnterpriseFolderOperationCompleted); } this.InvokeAsync("CreateEnterpriseFolder", new object[] { - itemId, - folderName, - quota, - quotaType, - addDefaultGroup}, this.CreateEnterpriseFolderOperationCompleted, userState); + itemId, + folderName, + quota, + quotaType, + addDefaultGroup}, this.CreateEnterpriseFolderOperationCompleted, userState); } - - private void OnCreateEnterpriseFolderOperationCompleted(object arg) - { - if ((this.CreateEnterpriseFolderCompleted != null)) - { + + private void OnCreateEnterpriseFolderOperationCompleted(object arg) { + if ((this.CreateEnterpriseFolderCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateEnterpriseFolderCompleted(this, new CreateEnterpriseFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteEnterpriseFolder", 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 DeleteEnterpriseFolder(int itemId, string folderName) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteEnterpriseFolder", 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 DeleteEnterpriseFolder(int itemId, string folderName) { object[] results = this.Invoke("DeleteEnterpriseFolder", new object[] { - itemId, - folderName}); + itemId, + folderName}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteEnterpriseFolder(int itemId, string folderName, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDeleteEnterpriseFolder(int itemId, string folderName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeleteEnterpriseFolder", new object[] { - itemId, - folderName}, callback, asyncState); + itemId, + folderName}, callback, asyncState); } - + /// - public ResultObject EndDeleteEnterpriseFolder(System.IAsyncResult asyncResult) - { + public ResultObject EndDeleteEnterpriseFolder(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void DeleteEnterpriseFolderAsync(int itemId, string folderName) - { + public void DeleteEnterpriseFolderAsync(int itemId, string folderName) { this.DeleteEnterpriseFolderAsync(itemId, folderName, null); } - + /// - public void DeleteEnterpriseFolderAsync(int itemId, string folderName, object userState) - { - if ((this.DeleteEnterpriseFolderOperationCompleted == null)) - { + public void DeleteEnterpriseFolderAsync(int itemId, string folderName, object userState) { + if ((this.DeleteEnterpriseFolderOperationCompleted == null)) { this.DeleteEnterpriseFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteEnterpriseFolderOperationCompleted); } this.InvokeAsync("DeleteEnterpriseFolder", new object[] { - itemId, - folderName}, this.DeleteEnterpriseFolderOperationCompleted, userState); + itemId, + folderName}, this.DeleteEnterpriseFolderOperationCompleted, userState); } - - private void OnDeleteEnterpriseFolderOperationCompleted(object arg) - { - if ((this.DeleteEnterpriseFolderCompleted != null)) - { + + private void OnDeleteEnterpriseFolderOperationCompleted(object arg) { + if ((this.DeleteEnterpriseFolderCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteEnterpriseFolderCompleted(this, new DeleteEnterpriseFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetEnterpriseFolderPermissions", 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 ESPermission[] GetEnterpriseFolderPermissions(int itemId, string folderName) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetEnterpriseFolderPermissions", 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 ESPermission[] GetEnterpriseFolderPermissions(int itemId, string folderName) { object[] results = this.Invoke("GetEnterpriseFolderPermissions", new object[] { - itemId, - folderName}); + itemId, + folderName}); return ((ESPermission[])(results[0])); } - + /// - public System.IAsyncResult BeginGetEnterpriseFolderPermissions(int itemId, string folderName, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetEnterpriseFolderPermissions(int itemId, string folderName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetEnterpriseFolderPermissions", new object[] { - itemId, - folderName}, callback, asyncState); + itemId, + folderName}, callback, asyncState); } - + /// - public ESPermission[] EndGetEnterpriseFolderPermissions(System.IAsyncResult asyncResult) - { + public ESPermission[] EndGetEnterpriseFolderPermissions(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ESPermission[])(results[0])); } - + /// - public void GetEnterpriseFolderPermissionsAsync(int itemId, string folderName) - { + public void GetEnterpriseFolderPermissionsAsync(int itemId, string folderName) { this.GetEnterpriseFolderPermissionsAsync(itemId, folderName, null); } - + /// - public void GetEnterpriseFolderPermissionsAsync(int itemId, string folderName, object userState) - { - if ((this.GetEnterpriseFolderPermissionsOperationCompleted == null)) - { + public void GetEnterpriseFolderPermissionsAsync(int itemId, string folderName, object userState) { + if ((this.GetEnterpriseFolderPermissionsOperationCompleted == null)) { this.GetEnterpriseFolderPermissionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetEnterpriseFolderPermissionsOperationCompleted); } this.InvokeAsync("GetEnterpriseFolderPermissions", new object[] { - itemId, - folderName}, this.GetEnterpriseFolderPermissionsOperationCompleted, userState); + itemId, + folderName}, this.GetEnterpriseFolderPermissionsOperationCompleted, userState); } - - private void OnGetEnterpriseFolderPermissionsOperationCompleted(object arg) - { - if ((this.GetEnterpriseFolderPermissionsCompleted != null)) - { + + private void OnGetEnterpriseFolderPermissionsOperationCompleted(object arg) { + if ((this.GetEnterpriseFolderPermissionsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetEnterpriseFolderPermissionsCompleted(this, new GetEnterpriseFolderPermissionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetEnterpriseFolderPermissions", 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 SetEnterpriseFolderPermissions(int itemId, string folderName, ESPermission[] permission) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetEnterpriseFolderPermissions", 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 SetEnterpriseFolderPermissions(int itemId, string folderName, ESPermission[] permission) { object[] results = this.Invoke("SetEnterpriseFolderPermissions", new object[] { - itemId, - folderName, - permission}); + itemId, + folderName, + permission}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginSetEnterpriseFolderPermissions(int itemId, string folderName, ESPermission[] permission, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetEnterpriseFolderPermissions(int itemId, string folderName, ESPermission[] permission, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetEnterpriseFolderPermissions", new object[] { - itemId, - folderName, - permission}, callback, asyncState); + itemId, + folderName, + permission}, callback, asyncState); } - + /// - public ResultObject EndSetEnterpriseFolderPermissions(System.IAsyncResult asyncResult) - { + public ResultObject EndSetEnterpriseFolderPermissions(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void SetEnterpriseFolderPermissionsAsync(int itemId, string folderName, ESPermission[] permission) - { + public void SetEnterpriseFolderPermissionsAsync(int itemId, string folderName, ESPermission[] permission) { this.SetEnterpriseFolderPermissionsAsync(itemId, folderName, permission, null); } - + /// - public void SetEnterpriseFolderPermissionsAsync(int itemId, string folderName, ESPermission[] permission, object userState) - { - if ((this.SetEnterpriseFolderPermissionsOperationCompleted == null)) - { + public void SetEnterpriseFolderPermissionsAsync(int itemId, string folderName, ESPermission[] permission, object userState) { + if ((this.SetEnterpriseFolderPermissionsOperationCompleted == null)) { this.SetEnterpriseFolderPermissionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetEnterpriseFolderPermissionsOperationCompleted); } this.InvokeAsync("SetEnterpriseFolderPermissions", new object[] { - itemId, - folderName, - permission}, this.SetEnterpriseFolderPermissionsOperationCompleted, userState); + itemId, + folderName, + permission}, this.SetEnterpriseFolderPermissionsOperationCompleted, userState); } - - private void OnSetEnterpriseFolderPermissionsOperationCompleted(object arg) - { - if ((this.SetEnterpriseFolderPermissionsCompleted != null)) - { + + private void OnSetEnterpriseFolderPermissionsOperationCompleted(object arg) { + if ((this.SetEnterpriseFolderPermissionsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetEnterpriseFolderPermissionsCompleted(this, new SetEnterpriseFolderPermissionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SearchESAccounts", 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 ExchangeAccount[] SearchESAccounts(int itemId, string filterColumn, string filterValue, string sortColumn) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SearchESAccounts", 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 ExchangeAccount[] SearchESAccounts(int itemId, string filterColumn, string filterValue, string sortColumn) { object[] results = this.Invoke("SearchESAccounts", new object[] { - itemId, - filterColumn, - filterValue, - sortColumn}); + itemId, + filterColumn, + filterValue, + sortColumn}); return ((ExchangeAccount[])(results[0])); } - + /// - public System.IAsyncResult BeginSearchESAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSearchESAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SearchESAccounts", new object[] { - itemId, - filterColumn, - filterValue, - sortColumn}, callback, asyncState); + itemId, + filterColumn, + filterValue, + sortColumn}, callback, asyncState); } - + /// - public ExchangeAccount[] EndSearchESAccounts(System.IAsyncResult asyncResult) - { + public ExchangeAccount[] EndSearchESAccounts(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ExchangeAccount[])(results[0])); } - + /// - public void SearchESAccountsAsync(int itemId, string filterColumn, string filterValue, string sortColumn) - { + public void SearchESAccountsAsync(int itemId, string filterColumn, string filterValue, string sortColumn) { this.SearchESAccountsAsync(itemId, filterColumn, filterValue, sortColumn, null); } - + /// - public void SearchESAccountsAsync(int itemId, string filterColumn, string filterValue, string sortColumn, object userState) - { - if ((this.SearchESAccountsOperationCompleted == null)) - { + public void SearchESAccountsAsync(int itemId, string filterColumn, string filterValue, string sortColumn, object userState) { + if ((this.SearchESAccountsOperationCompleted == null)) { this.SearchESAccountsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchESAccountsOperationCompleted); } this.InvokeAsync("SearchESAccounts", new object[] { - itemId, - filterColumn, - filterValue, - sortColumn}, this.SearchESAccountsOperationCompleted, userState); + itemId, + filterColumn, + filterValue, + sortColumn}, this.SearchESAccountsOperationCompleted, userState); } - - private void OnSearchESAccountsOperationCompleted(object arg) - { - if ((this.SearchESAccountsCompleted != null)) - { + + private void OnSearchESAccountsOperationCompleted(object arg) { + if ((this.SearchESAccountsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SearchESAccountsCompleted(this, new SearchESAccountsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetEnterpriseFoldersPaged", 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 SystemFilesPaged GetEnterpriseFoldersPaged(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetEnterpriseFoldersPaged", 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 SystemFilesPaged GetEnterpriseFoldersPaged(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows) { object[] results = this.Invoke("GetEnterpriseFoldersPaged", new object[] { - itemId, - filterValue, - sortColumn, - startRow, - maximumRows}); + itemId, + filterValue, + sortColumn, + startRow, + maximumRows}); return ((SystemFilesPaged)(results[0])); } - + /// - public System.IAsyncResult BeginGetEnterpriseFoldersPaged(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetEnterpriseFoldersPaged(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetEnterpriseFoldersPaged", new object[] { - itemId, - filterValue, - sortColumn, - startRow, - maximumRows}, callback, asyncState); + itemId, + filterValue, + sortColumn, + startRow, + maximumRows}, callback, asyncState); } - + /// - public SystemFilesPaged EndGetEnterpriseFoldersPaged(System.IAsyncResult asyncResult) - { + public SystemFilesPaged EndGetEnterpriseFoldersPaged(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SystemFilesPaged)(results[0])); } - + /// - public void GetEnterpriseFoldersPagedAsync(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows) - { + public void GetEnterpriseFoldersPagedAsync(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows) { this.GetEnterpriseFoldersPagedAsync(itemId, filterValue, sortColumn, startRow, maximumRows, null); } - + /// - public void GetEnterpriseFoldersPagedAsync(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) - { - if ((this.GetEnterpriseFoldersPagedOperationCompleted == null)) - { + public void GetEnterpriseFoldersPagedAsync(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) { + if ((this.GetEnterpriseFoldersPagedOperationCompleted == null)) { this.GetEnterpriseFoldersPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetEnterpriseFoldersPagedOperationCompleted); } this.InvokeAsync("GetEnterpriseFoldersPaged", new object[] { - itemId, - filterValue, - sortColumn, - startRow, - maximumRows}, this.GetEnterpriseFoldersPagedOperationCompleted, userState); + itemId, + filterValue, + sortColumn, + startRow, + maximumRows}, this.GetEnterpriseFoldersPagedOperationCompleted, userState); } - - private void OnGetEnterpriseFoldersPagedOperationCompleted(object arg) - { - if ((this.GetEnterpriseFoldersPagedCompleted != null)) - { + + private void OnGetEnterpriseFoldersPagedOperationCompleted(object arg) { + if ((this.GetEnterpriseFoldersPagedCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetEnterpriseFoldersPagedCompleted(this, new GetEnterpriseFoldersPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/RenameEnterpriseFolder", 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 SystemFile RenameEnterpriseFolder(int itemId, string oldName, string newName) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/RenameEnterpriseFolder", 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 SystemFile RenameEnterpriseFolder(int itemId, string oldName, string newName) { object[] results = this.Invoke("RenameEnterpriseFolder", new object[] { - itemId, - oldName, - newName}); + itemId, + oldName, + newName}); return ((SystemFile)(results[0])); } - + /// - public System.IAsyncResult BeginRenameEnterpriseFolder(int itemId, string oldName, string newName, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginRenameEnterpriseFolder(int itemId, string oldName, string newName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("RenameEnterpriseFolder", new object[] { - itemId, - oldName, - newName}, callback, asyncState); + itemId, + oldName, + newName}, callback, asyncState); } - + /// - public SystemFile EndRenameEnterpriseFolder(System.IAsyncResult asyncResult) - { + public SystemFile EndRenameEnterpriseFolder(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SystemFile)(results[0])); } - + /// - public void RenameEnterpriseFolderAsync(int itemId, string oldName, string newName) - { + public void RenameEnterpriseFolderAsync(int itemId, string oldName, string newName) { this.RenameEnterpriseFolderAsync(itemId, oldName, newName, null); } - + /// - public void RenameEnterpriseFolderAsync(int itemId, string oldName, string newName, object userState) - { - if ((this.RenameEnterpriseFolderOperationCompleted == null)) - { + public void RenameEnterpriseFolderAsync(int itemId, string oldName, string newName, object userState) { + if ((this.RenameEnterpriseFolderOperationCompleted == null)) { this.RenameEnterpriseFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRenameEnterpriseFolderOperationCompleted); } this.InvokeAsync("RenameEnterpriseFolder", new object[] { - itemId, - oldName, - newName}, this.RenameEnterpriseFolderOperationCompleted, userState); + itemId, + oldName, + newName}, this.RenameEnterpriseFolderOperationCompleted, userState); } - - private void OnRenameEnterpriseFolderOperationCompleted(object arg) - { - if ((this.RenameEnterpriseFolderCompleted != null)) - { + + private void OnRenameEnterpriseFolderOperationCompleted(object arg) { + if ((this.RenameEnterpriseFolderCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.RenameEnterpriseFolderCompleted(this, new RenameEnterpriseFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateEnterpriseStorage", 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 CreateEnterpriseStorage(int packageId, int itemId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateEnterpriseStorage", 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 CreateEnterpriseStorage(int packageId, int itemId) { object[] results = this.Invoke("CreateEnterpriseStorage", new object[] { - packageId, - itemId}); + packageId, + itemId}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginCreateEnterpriseStorage(int packageId, int itemId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCreateEnterpriseStorage(int packageId, int itemId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CreateEnterpriseStorage", new object[] { - packageId, - itemId}, callback, asyncState); + packageId, + itemId}, callback, asyncState); } - + /// - public ResultObject EndCreateEnterpriseStorage(System.IAsyncResult asyncResult) - { + public ResultObject EndCreateEnterpriseStorage(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void CreateEnterpriseStorageAsync(int packageId, int itemId) - { + public void CreateEnterpriseStorageAsync(int packageId, int itemId) { this.CreateEnterpriseStorageAsync(packageId, itemId, null); } - + /// - public void CreateEnterpriseStorageAsync(int packageId, int itemId, object userState) - { - if ((this.CreateEnterpriseStorageOperationCompleted == null)) - { + public void CreateEnterpriseStorageAsync(int packageId, int itemId, object userState) { + if ((this.CreateEnterpriseStorageOperationCompleted == null)) { this.CreateEnterpriseStorageOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateEnterpriseStorageOperationCompleted); } this.InvokeAsync("CreateEnterpriseStorage", new object[] { - packageId, - itemId}, this.CreateEnterpriseStorageOperationCompleted, userState); + packageId, + itemId}, this.CreateEnterpriseStorageOperationCompleted, userState); } - - private void OnCreateEnterpriseStorageOperationCompleted(object arg) - { - if ((this.CreateEnterpriseStorageCompleted != null)) - { + + private void OnCreateEnterpriseStorageOperationCompleted(object arg) { + if ((this.CreateEnterpriseStorageCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateEnterpriseStorageCompleted(this, new CreateEnterpriseStorageCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CheckEnterpriseStorageInitialization" + - "", 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 CheckEnterpriseStorageInitialization(int packageId, int itemId) - { + "", 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 CheckEnterpriseStorageInitialization(int packageId, int itemId) { object[] results = this.Invoke("CheckEnterpriseStorageInitialization", new object[] { - packageId, - itemId}); + packageId, + itemId}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginCheckEnterpriseStorageInitialization(int packageId, int itemId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCheckEnterpriseStorageInitialization(int packageId, int itemId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CheckEnterpriseStorageInitialization", new object[] { - packageId, - itemId}, callback, asyncState); + packageId, + itemId}, callback, asyncState); } - + /// - public bool EndCheckEnterpriseStorageInitialization(System.IAsyncResult asyncResult) - { + public bool EndCheckEnterpriseStorageInitialization(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void CheckEnterpriseStorageInitializationAsync(int packageId, int itemId) - { + public void CheckEnterpriseStorageInitializationAsync(int packageId, int itemId) { this.CheckEnterpriseStorageInitializationAsync(packageId, itemId, null); } - + /// - public void CheckEnterpriseStorageInitializationAsync(int packageId, int itemId, object userState) - { - if ((this.CheckEnterpriseStorageInitializationOperationCompleted == null)) - { + public void CheckEnterpriseStorageInitializationAsync(int packageId, int itemId, object userState) { + if ((this.CheckEnterpriseStorageInitializationOperationCompleted == null)) { this.CheckEnterpriseStorageInitializationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckEnterpriseStorageInitializationOperationCompleted); } this.InvokeAsync("CheckEnterpriseStorageInitialization", new object[] { - packageId, - itemId}, this.CheckEnterpriseStorageInitializationOperationCompleted, userState); + packageId, + itemId}, this.CheckEnterpriseStorageInitializationOperationCompleted, userState); } - - private void OnCheckEnterpriseStorageInitializationOperationCompleted(object arg) - { - if ((this.CheckEnterpriseStorageInitializationCompleted != null)) - { + + private void OnCheckEnterpriseStorageInitializationOperationCompleted(object arg) { + if ((this.CheckEnterpriseStorageInitializationCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CheckEnterpriseStorageInitializationCompleted(this, new CheckEnterpriseStorageInitializationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CheckUsersDomainExists", 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 CheckUsersDomainExists(int itemId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CheckUsersDomainExists", 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 CheckUsersDomainExists(int itemId) { object[] results = this.Invoke("CheckUsersDomainExists", new object[] { - itemId}); + itemId}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginCheckUsersDomainExists(int itemId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCheckUsersDomainExists(int itemId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CheckUsersDomainExists", new object[] { - itemId}, callback, asyncState); + itemId}, callback, asyncState); } - + /// - public bool EndCheckUsersDomainExists(System.IAsyncResult asyncResult) - { + public bool EndCheckUsersDomainExists(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void CheckUsersDomainExistsAsync(int itemId) - { + public void CheckUsersDomainExistsAsync(int itemId) { this.CheckUsersDomainExistsAsync(itemId, null); } - + /// - public void CheckUsersDomainExistsAsync(int itemId, object userState) - { - if ((this.CheckUsersDomainExistsOperationCompleted == null)) - { + public void CheckUsersDomainExistsAsync(int itemId, object userState) { + if ((this.CheckUsersDomainExistsOperationCompleted == null)) { this.CheckUsersDomainExistsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckUsersDomainExistsOperationCompleted); } this.InvokeAsync("CheckUsersDomainExists", new object[] { - itemId}, this.CheckUsersDomainExistsOperationCompleted, userState); + itemId}, this.CheckUsersDomainExistsOperationCompleted, userState); } - - private void OnCheckUsersDomainExistsOperationCompleted(object arg) - { - if ((this.CheckUsersDomainExistsCompleted != null)) - { + + private void OnCheckUsersDomainExistsOperationCompleted(object arg) { + if ((this.CheckUsersDomainExistsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CheckUsersDomainExistsCompleted(this, new CheckUsersDomainExistsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDirectoryBrowseEnabled", 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 GetDirectoryBrowseEnabled(int itemId, string site) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDirectoryBrowseEnabled", 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 GetDirectoryBrowseEnabled(int itemId, string site) { object[] results = this.Invoke("GetDirectoryBrowseEnabled", new object[] { - itemId, - site}); + itemId, + site}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginGetDirectoryBrowseEnabled(int itemId, string site, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetDirectoryBrowseEnabled(int itemId, string site, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetDirectoryBrowseEnabled", new object[] { - itemId, - site}, callback, asyncState); + itemId, + site}, callback, asyncState); } - + /// - public bool EndGetDirectoryBrowseEnabled(System.IAsyncResult asyncResult) - { + public bool EndGetDirectoryBrowseEnabled(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void GetDirectoryBrowseEnabledAsync(int itemId, string site) - { + public void GetDirectoryBrowseEnabledAsync(int itemId, string site) { this.GetDirectoryBrowseEnabledAsync(itemId, site, null); } - + /// - public void GetDirectoryBrowseEnabledAsync(int itemId, string site, object userState) - { - if ((this.GetDirectoryBrowseEnabledOperationCompleted == null)) - { + public void GetDirectoryBrowseEnabledAsync(int itemId, string site, object userState) { + if ((this.GetDirectoryBrowseEnabledOperationCompleted == null)) { this.GetDirectoryBrowseEnabledOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDirectoryBrowseEnabledOperationCompleted); } this.InvokeAsync("GetDirectoryBrowseEnabled", new object[] { - itemId, - site}, this.GetDirectoryBrowseEnabledOperationCompleted, userState); + itemId, + site}, this.GetDirectoryBrowseEnabledOperationCompleted, userState); } - - private void OnGetDirectoryBrowseEnabledOperationCompleted(object arg) - { - if ((this.GetDirectoryBrowseEnabledCompleted != null)) - { + + private void OnGetDirectoryBrowseEnabledOperationCompleted(object arg) { + if ((this.GetDirectoryBrowseEnabledCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDirectoryBrowseEnabledCompleted(this, new GetDirectoryBrowseEnabledCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDirectoryBrowseEnabled", 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 void SetDirectoryBrowseEnabled(int itemId, string site, bool enabled) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDirectoryBrowseEnabled", 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 void SetDirectoryBrowseEnabled(int itemId, string site, bool enabled) { this.Invoke("SetDirectoryBrowseEnabled", new object[] { - itemId, - site, - enabled}); + itemId, + site, + enabled}); } - + /// - public System.IAsyncResult BeginSetDirectoryBrowseEnabled(int itemId, string site, bool enabled, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetDirectoryBrowseEnabled(int itemId, string site, bool enabled, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetDirectoryBrowseEnabled", new object[] { - itemId, - site, - enabled}, callback, asyncState); + itemId, + site, + enabled}, callback, asyncState); } - + /// - public void EndSetDirectoryBrowseEnabled(System.IAsyncResult asyncResult) - { + public void EndSetDirectoryBrowseEnabled(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } - + /// - public void SetDirectoryBrowseEnabledAsync(int itemId, string site, bool enabled) - { + public void SetDirectoryBrowseEnabledAsync(int itemId, string site, bool enabled) { this.SetDirectoryBrowseEnabledAsync(itemId, site, enabled, null); } - + /// - public void SetDirectoryBrowseEnabledAsync(int itemId, string site, bool enabled, object userState) - { - if ((this.SetDirectoryBrowseEnabledOperationCompleted == null)) - { + public void SetDirectoryBrowseEnabledAsync(int itemId, string site, bool enabled, object userState) { + if ((this.SetDirectoryBrowseEnabledOperationCompleted == null)) { this.SetDirectoryBrowseEnabledOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDirectoryBrowseEnabledOperationCompleted); } this.InvokeAsync("SetDirectoryBrowseEnabled", new object[] { - itemId, - site, - enabled}, this.SetDirectoryBrowseEnabledOperationCompleted, userState); + itemId, + site, + enabled}, this.SetDirectoryBrowseEnabledOperationCompleted, userState); } - - private void OnSetDirectoryBrowseEnabledOperationCompleted(object arg) - { - if ((this.SetDirectoryBrowseEnabledCompleted != null)) - { + + private void OnSetDirectoryBrowseEnabledOperationCompleted(object arg) { + if ((this.SetDirectoryBrowseEnabledCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetDirectoryBrowseEnabledCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetEnterpriseFolderSettings", 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 void SetEnterpriseFolderSettings(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetEnterpriseFolderSettings", 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 void SetEnterpriseFolderSettings(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType) { this.Invoke("SetEnterpriseFolderSettings", new object[] { - itemId, - folder, - permissions, - directoyBrowsingEnabled, - quota, - quotaType}); + itemId, + folder, + permissions, + directoyBrowsingEnabled, + quota, + quotaType}); } - + /// - public System.IAsyncResult BeginSetEnterpriseFolderSettings(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetEnterpriseFolderSettings(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetEnterpriseFolderSettings", new object[] { - itemId, - folder, - permissions, - directoyBrowsingEnabled, - quota, - quotaType}, callback, asyncState); + itemId, + folder, + permissions, + directoyBrowsingEnabled, + quota, + quotaType}, callback, asyncState); } - + /// - public void EndSetEnterpriseFolderSettings(System.IAsyncResult asyncResult) - { + public void EndSetEnterpriseFolderSettings(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } - + /// - public void SetEnterpriseFolderSettingsAsync(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType) - { + public void SetEnterpriseFolderSettingsAsync(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType) { this.SetEnterpriseFolderSettingsAsync(itemId, folder, permissions, directoyBrowsingEnabled, quota, quotaType, null); } - + /// - public void SetEnterpriseFolderSettingsAsync(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType, object userState) - { - if ((this.SetEnterpriseFolderSettingsOperationCompleted == null)) - { + public void SetEnterpriseFolderSettingsAsync(int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType, object userState) { + if ((this.SetEnterpriseFolderSettingsOperationCompleted == null)) { this.SetEnterpriseFolderSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetEnterpriseFolderSettingsOperationCompleted); } this.InvokeAsync("SetEnterpriseFolderSettings", new object[] { - itemId, - folder, - permissions, - directoyBrowsingEnabled, - quota, - quotaType}, this.SetEnterpriseFolderSettingsOperationCompleted, userState); + itemId, + folder, + permissions, + directoyBrowsingEnabled, + quota, + quotaType}, this.SetEnterpriseFolderSettingsOperationCompleted, userState); } - - private void OnSetEnterpriseFolderSettingsOperationCompleted(object arg) - { - if ((this.SetEnterpriseFolderSettingsCompleted != null)) - { + + private void OnSetEnterpriseFolderSettingsOperationCompleted(object arg) { + if ((this.SetEnterpriseFolderSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetEnterpriseFolderSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetStatistics", 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 OrganizationStatistics GetStatistics(int itemId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetStatistics", 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 OrganizationStatistics GetStatistics(int itemId) { object[] results = this.Invoke("GetStatistics", new object[] { - itemId}); + itemId}); return ((OrganizationStatistics)(results[0])); } - + /// - public System.IAsyncResult BeginGetStatistics(int itemId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetStatistics(int itemId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetStatistics", new object[] { - itemId}, callback, asyncState); + itemId}, callback, asyncState); } - + /// - public OrganizationStatistics EndGetStatistics(System.IAsyncResult asyncResult) - { + public OrganizationStatistics EndGetStatistics(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((OrganizationStatistics)(results[0])); } - + /// - public void GetStatisticsAsync(int itemId) - { + public void GetStatisticsAsync(int itemId) { this.GetStatisticsAsync(itemId, null); } - + /// - public void GetStatisticsAsync(int itemId, object userState) - { - if ((this.GetStatisticsOperationCompleted == null)) - { + public void GetStatisticsAsync(int itemId, object userState) { + if ((this.GetStatisticsOperationCompleted == null)) { this.GetStatisticsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetStatisticsOperationCompleted); } this.InvokeAsync("GetStatistics", new object[] { - itemId}, this.GetStatisticsOperationCompleted, userState); + itemId}, this.GetStatisticsOperationCompleted, userState); } - - private void OnGetStatisticsOperationCompleted(object arg) - { - if ((this.GetStatisticsCompleted != null)) - { + + private void OnGetStatisticsOperationCompleted(object arg) { + if ((this.GetStatisticsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetStatisticsCompleted(this, new GetStatisticsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetStatisticsByOrganization", 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 OrganizationStatistics GetStatisticsByOrganization(int itemId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetStatisticsByOrganization", 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 OrganizationStatistics GetStatisticsByOrganization(int itemId) { object[] results = this.Invoke("GetStatisticsByOrganization", new object[] { - itemId}); + itemId}); return ((OrganizationStatistics)(results[0])); } - + /// - public System.IAsyncResult BeginGetStatisticsByOrganization(int itemId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetStatisticsByOrganization(int itemId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetStatisticsByOrganization", new object[] { - itemId}, callback, asyncState); + itemId}, callback, asyncState); } - + /// - public OrganizationStatistics EndGetStatisticsByOrganization(System.IAsyncResult asyncResult) - { + public OrganizationStatistics EndGetStatisticsByOrganization(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((OrganizationStatistics)(results[0])); } - + /// - public void GetStatisticsByOrganizationAsync(int itemId) - { + public void GetStatisticsByOrganizationAsync(int itemId) { this.GetStatisticsByOrganizationAsync(itemId, null); } - + /// - public void GetStatisticsByOrganizationAsync(int itemId, object userState) - { - if ((this.GetStatisticsByOrganizationOperationCompleted == null)) - { + public void GetStatisticsByOrganizationAsync(int itemId, object userState) { + if ((this.GetStatisticsByOrganizationOperationCompleted == null)) { this.GetStatisticsByOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetStatisticsByOrganizationOperationCompleted); } this.InvokeAsync("GetStatisticsByOrganization", new object[] { - itemId}, this.GetStatisticsByOrganizationOperationCompleted, userState); + itemId}, this.GetStatisticsByOrganizationOperationCompleted, userState); } - - private void OnGetStatisticsByOrganizationOperationCompleted(object arg) - { - if ((this.GetStatisticsByOrganizationCompleted != null)) - { + + private void OnGetStatisticsByOrganizationOperationCompleted(object arg) { + if ((this.GetStatisticsByOrganizationCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetStatisticsByOrganizationCompleted(this, new GetStatisticsByOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateMappedDrive", 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 CreateMappedDrive(int packageId, int itemId, string driveLetter, string labelAs, string folderName) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateMappedDrive", 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 CreateMappedDrive(int packageId, int itemId, string driveLetter, string labelAs, string folderName) { object[] results = this.Invoke("CreateMappedDrive", new object[] { - packageId, - itemId, - driveLetter, - labelAs, - folderName}); + packageId, + itemId, + driveLetter, + labelAs, + folderName}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginCreateMappedDrive(int packageId, int itemId, string driveLetter, string labelAs, string folderName, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCreateMappedDrive(int packageId, int itemId, string driveLetter, string labelAs, string folderName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CreateMappedDrive", new object[] { - packageId, - itemId, - driveLetter, - labelAs, - folderName}, callback, asyncState); + packageId, + itemId, + driveLetter, + labelAs, + folderName}, callback, asyncState); } - + /// - public ResultObject EndCreateMappedDrive(System.IAsyncResult asyncResult) - { + public ResultObject EndCreateMappedDrive(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void CreateMappedDriveAsync(int packageId, int itemId, string driveLetter, string labelAs, string folderName) - { + public void CreateMappedDriveAsync(int packageId, int itemId, string driveLetter, string labelAs, string folderName) { this.CreateMappedDriveAsync(packageId, itemId, driveLetter, labelAs, folderName, null); } - + /// - public void CreateMappedDriveAsync(int packageId, int itemId, string driveLetter, string labelAs, string folderName, object userState) - { - if ((this.CreateMappedDriveOperationCompleted == null)) - { + public void CreateMappedDriveAsync(int packageId, int itemId, string driveLetter, string labelAs, string folderName, object userState) { + if ((this.CreateMappedDriveOperationCompleted == null)) { this.CreateMappedDriveOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateMappedDriveOperationCompleted); } this.InvokeAsync("CreateMappedDrive", new object[] { - packageId, - itemId, - driveLetter, - labelAs, - folderName}, this.CreateMappedDriveOperationCompleted, userState); + packageId, + itemId, + driveLetter, + labelAs, + folderName}, this.CreateMappedDriveOperationCompleted, userState); } - - private void OnCreateMappedDriveOperationCompleted(object arg) - { - if ((this.CreateMappedDriveCompleted != null)) - { + + private void OnCreateMappedDriveOperationCompleted(object arg) { + if ((this.CreateMappedDriveCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateMappedDriveCompleted(this, new CreateMappedDriveCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteMappedDrive", 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 DeleteMappedDrive(int itemId, string driveLetter) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteMappedDrive", 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 DeleteMappedDrive(int itemId, string driveLetter) { object[] results = this.Invoke("DeleteMappedDrive", new object[] { - itemId, - driveLetter}); + itemId, + driveLetter}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteMappedDrive(int itemId, string driveLetter, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDeleteMappedDrive(int itemId, string driveLetter, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeleteMappedDrive", new object[] { - itemId, - driveLetter}, callback, asyncState); + itemId, + driveLetter}, callback, asyncState); } - + /// - public ResultObject EndDeleteMappedDrive(System.IAsyncResult asyncResult) - { + public ResultObject EndDeleteMappedDrive(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void DeleteMappedDriveAsync(int itemId, string driveLetter) - { + public void DeleteMappedDriveAsync(int itemId, string driveLetter) { this.DeleteMappedDriveAsync(itemId, driveLetter, null); } - + /// - public void DeleteMappedDriveAsync(int itemId, string driveLetter, object userState) - { - if ((this.DeleteMappedDriveOperationCompleted == null)) - { + public void DeleteMappedDriveAsync(int itemId, string driveLetter, object userState) { + if ((this.DeleteMappedDriveOperationCompleted == null)) { this.DeleteMappedDriveOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteMappedDriveOperationCompleted); } this.InvokeAsync("DeleteMappedDrive", new object[] { - itemId, - driveLetter}, this.DeleteMappedDriveOperationCompleted, userState); + itemId, + driveLetter}, this.DeleteMappedDriveOperationCompleted, userState); } - - private void OnDeleteMappedDriveOperationCompleted(object arg) - { - if ((this.DeleteMappedDriveCompleted != null)) - { + + private void OnDeleteMappedDriveOperationCompleted(object arg) { + if ((this.DeleteMappedDriveCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteMappedDriveCompleted(this, new DeleteMappedDriveCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDriveMapsPaged", 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 MappedDrivesPaged GetDriveMapsPaged(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDriveMapsPaged", 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 MappedDrivesPaged GetDriveMapsPaged(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows) { object[] results = this.Invoke("GetDriveMapsPaged", new object[] { - itemId, - filterValue, - sortColumn, - startRow, - maximumRows}); + itemId, + filterValue, + sortColumn, + startRow, + maximumRows}); return ((MappedDrivesPaged)(results[0])); } - + /// - public System.IAsyncResult BeginGetDriveMapsPaged(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetDriveMapsPaged(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetDriveMapsPaged", new object[] { - itemId, - filterValue, - sortColumn, - startRow, - maximumRows}, callback, asyncState); + itemId, + filterValue, + sortColumn, + startRow, + maximumRows}, callback, asyncState); } - + /// - public MappedDrivesPaged EndGetDriveMapsPaged(System.IAsyncResult asyncResult) - { + public MappedDrivesPaged EndGetDriveMapsPaged(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((MappedDrivesPaged)(results[0])); } - + /// - public void GetDriveMapsPagedAsync(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows) - { + public void GetDriveMapsPagedAsync(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows) { this.GetDriveMapsPagedAsync(itemId, filterValue, sortColumn, startRow, maximumRows, null); } - + /// - public void GetDriveMapsPagedAsync(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) - { - if ((this.GetDriveMapsPagedOperationCompleted == null)) - { + public void GetDriveMapsPagedAsync(int itemId, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) { + if ((this.GetDriveMapsPagedOperationCompleted == null)) { this.GetDriveMapsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDriveMapsPagedOperationCompleted); } this.InvokeAsync("GetDriveMapsPaged", new object[] { - itemId, - filterValue, - sortColumn, - startRow, - maximumRows}, this.GetDriveMapsPagedOperationCompleted, userState); + itemId, + filterValue, + sortColumn, + startRow, + maximumRows}, this.GetDriveMapsPagedOperationCompleted, userState); } - - private void OnGetDriveMapsPagedOperationCompleted(object arg) - { - if ((this.GetDriveMapsPagedCompleted != null)) - { + + private void OnGetDriveMapsPagedOperationCompleted(object arg) { + if ((this.GetDriveMapsPagedCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDriveMapsPagedCompleted(this, new GetDriveMapsPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetUsedDriveLetters", 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[] GetUsedDriveLetters(int itemId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetUsedDriveLetters", 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[] GetUsedDriveLetters(int itemId) { object[] results = this.Invoke("GetUsedDriveLetters", new object[] { - itemId}); + itemId}); return ((string[])(results[0])); } - + /// - public System.IAsyncResult BeginGetUsedDriveLetters(int itemId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetUsedDriveLetters(int itemId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetUsedDriveLetters", new object[] { - itemId}, callback, asyncState); + itemId}, callback, asyncState); } - + /// - public string[] EndGetUsedDriveLetters(System.IAsyncResult asyncResult) - { + public string[] EndGetUsedDriveLetters(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((string[])(results[0])); } - + /// - public void GetUsedDriveLettersAsync(int itemId) - { + public void GetUsedDriveLettersAsync(int itemId) { this.GetUsedDriveLettersAsync(itemId, null); } - + /// - public void GetUsedDriveLettersAsync(int itemId, object userState) - { - if ((this.GetUsedDriveLettersOperationCompleted == null)) - { + public void GetUsedDriveLettersAsync(int itemId, object userState) { + if ((this.GetUsedDriveLettersOperationCompleted == null)) { this.GetUsedDriveLettersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetUsedDriveLettersOperationCompleted); } this.InvokeAsync("GetUsedDriveLetters", new object[] { - itemId}, this.GetUsedDriveLettersOperationCompleted, userState); + itemId}, this.GetUsedDriveLettersOperationCompleted, userState); } - - private void OnGetUsedDriveLettersOperationCompleted(object arg) - { - if ((this.GetUsedDriveLettersCompleted != null)) - { + + private void OnGetUsedDriveLettersOperationCompleted(object arg) { + if ((this.GetUsedDriveLettersCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetUsedDriveLettersCompleted(this, new GetUsedDriveLettersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetNotMappedEnterpriseFolders", 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 SystemFile[] GetNotMappedEnterpriseFolders(int itemId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetNotMappedEnterpriseFolders", 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 SystemFile[] GetNotMappedEnterpriseFolders(int itemId) { object[] results = this.Invoke("GetNotMappedEnterpriseFolders", new object[] { - itemId}); + itemId}); return ((SystemFile[])(results[0])); } - + /// - public System.IAsyncResult BeginGetNotMappedEnterpriseFolders(int itemId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetNotMappedEnterpriseFolders(int itemId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetNotMappedEnterpriseFolders", new object[] { - itemId}, callback, asyncState); + itemId}, callback, asyncState); } - + /// - public SystemFile[] EndGetNotMappedEnterpriseFolders(System.IAsyncResult asyncResult) - { + public SystemFile[] EndGetNotMappedEnterpriseFolders(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SystemFile[])(results[0])); } - + /// - public void GetNotMappedEnterpriseFoldersAsync(int itemId) - { + public void GetNotMappedEnterpriseFoldersAsync(int itemId) { this.GetNotMappedEnterpriseFoldersAsync(itemId, null); } - + /// - public void GetNotMappedEnterpriseFoldersAsync(int itemId, object userState) - { - if ((this.GetNotMappedEnterpriseFoldersOperationCompleted == null)) - { + public void GetNotMappedEnterpriseFoldersAsync(int itemId, object userState) { + if ((this.GetNotMappedEnterpriseFoldersOperationCompleted == null)) { this.GetNotMappedEnterpriseFoldersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetNotMappedEnterpriseFoldersOperationCompleted); } this.InvokeAsync("GetNotMappedEnterpriseFolders", new object[] { - itemId}, this.GetNotMappedEnterpriseFoldersOperationCompleted, userState); + itemId}, this.GetNotMappedEnterpriseFoldersOperationCompleted, userState); } - - private void OnGetNotMappedEnterpriseFoldersOperationCompleted(object arg) - { - if ((this.GetNotMappedEnterpriseFoldersCompleted != null)) - { + + private void OnGetNotMappedEnterpriseFoldersOperationCompleted(object arg) { + if ((this.GetNotMappedEnterpriseFoldersCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetNotMappedEnterpriseFoldersCompleted(this, new GetNotMappedEnterpriseFoldersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - public new void CancelAsync(object userState) - { + public new void CancelAsync(object userState) { base.CancelAsync(userState); } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] - public delegate void CheckFileServicesInstallationCompletedEventHandler(object sender, CheckFileServicesInstallationCompletedEventArgs e); - + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void AddWebDavAccessTokenCompletedEventHandler(object sender, AddWebDavAccessTokenCompletedEventArgs e); + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CheckFileServicesInstallationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class AddWebDavAccessTokenCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CheckFileServicesInstallationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal AddWebDavAccessTokenCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void DeleteExpiredWebDavAccessTokensCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void GetWebDavAccessTokenByIdCompletedEventHandler(object sender, GetWebDavAccessTokenByIdCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetWebDavAccessTokenByIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetWebDavAccessTokenByIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public WebDavAccessToken Result { + get { + this.RaiseExceptionIfNecessary(); + return ((WebDavAccessToken)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void GetWebDavAccessTokenByAccessTokenCompletedEventHandler(object sender, GetWebDavAccessTokenByAccessTokenCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetWebDavAccessTokenByAccessTokenCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetWebDavAccessTokenByAccessTokenCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public WebDavAccessToken Result { + get { + this.RaiseExceptionIfNecessary(); + return ((WebDavAccessToken)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void CheckFileServicesInstallationCompletedEventHandler(object sender, CheckFileServicesInstallationCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CheckFileServicesInstallationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal CheckFileServicesInstallationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetEnterpriseFoldersCompletedEventHandler(object sender, GetEnterpriseFoldersCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetEnterpriseFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetEnterpriseFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetEnterpriseFoldersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetEnterpriseFoldersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SystemFile[] Result - { - get - { + public SystemFile[] Result { + get { this.RaiseExceptionIfNecessary(); return ((SystemFile[])(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetEnterpriseFolderCompletedEventHandler(object sender, GetEnterpriseFolderCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetEnterpriseFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetEnterpriseFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SystemFile Result - { - get - { + public SystemFile Result { + get { this.RaiseExceptionIfNecessary(); return ((SystemFile)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CreateEnterpriseFolderCompletedEventHandler(object sender, CreateEnterpriseFolderCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class CreateEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CreateEnterpriseFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal CreateEnterpriseFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ResultObject Result - { - get - { + public ResultObject Result { + get { this.RaiseExceptionIfNecessary(); return ((ResultObject)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void DeleteEnterpriseFolderCompletedEventHandler(object sender, DeleteEnterpriseFolderCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class DeleteEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal DeleteEnterpriseFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal DeleteEnterpriseFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ResultObject Result - { - get - { + public ResultObject Result { + get { this.RaiseExceptionIfNecessary(); return ((ResultObject)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetEnterpriseFolderPermissionsCompletedEventHandler(object sender, GetEnterpriseFolderPermissionsCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetEnterpriseFolderPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetEnterpriseFolderPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetEnterpriseFolderPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetEnterpriseFolderPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ESPermission[] Result - { - get - { + public ESPermission[] Result { + get { this.RaiseExceptionIfNecessary(); return ((ESPermission[])(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SetEnterpriseFolderPermissionsCompletedEventHandler(object sender, SetEnterpriseFolderPermissionsCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetEnterpriseFolderPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetEnterpriseFolderPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetEnterpriseFolderPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetEnterpriseFolderPermissionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ResultObject Result - { - get - { + public ResultObject Result { + get { this.RaiseExceptionIfNecessary(); return ((ResultObject)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SearchESAccountsCompletedEventHandler(object sender, SearchESAccountsCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SearchESAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SearchESAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SearchESAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SearchESAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ExchangeAccount[] Result - { - get - { + public ExchangeAccount[] Result { + get { this.RaiseExceptionIfNecessary(); return ((ExchangeAccount[])(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetEnterpriseFoldersPagedCompletedEventHandler(object sender, GetEnterpriseFoldersPagedCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetEnterpriseFoldersPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetEnterpriseFoldersPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetEnterpriseFoldersPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetEnterpriseFoldersPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SystemFilesPaged Result - { - get - { + public SystemFilesPaged Result { + get { this.RaiseExceptionIfNecessary(); return ((SystemFilesPaged)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void RenameEnterpriseFolderCompletedEventHandler(object sender, RenameEnterpriseFolderCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class RenameEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class RenameEnterpriseFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal RenameEnterpriseFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal RenameEnterpriseFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SystemFile Result - { - get - { + public SystemFile Result { + get { this.RaiseExceptionIfNecessary(); return ((SystemFile)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CreateEnterpriseStorageCompletedEventHandler(object sender, CreateEnterpriseStorageCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateEnterpriseStorageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class CreateEnterpriseStorageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CreateEnterpriseStorageCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal CreateEnterpriseStorageCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ResultObject Result - { - get - { + public ResultObject Result { + get { this.RaiseExceptionIfNecessary(); return ((ResultObject)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CheckEnterpriseStorageInitializationCompletedEventHandler(object sender, CheckEnterpriseStorageInitializationCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CheckEnterpriseStorageInitializationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class CheckEnterpriseStorageInitializationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CheckEnterpriseStorageInitializationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal CheckEnterpriseStorageInitializationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CheckUsersDomainExistsCompletedEventHandler(object sender, CheckUsersDomainExistsCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CheckUsersDomainExistsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class CheckUsersDomainExistsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CheckUsersDomainExistsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal CheckUsersDomainExistsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetDirectoryBrowseEnabledCompletedEventHandler(object sender, GetDirectoryBrowseEnabledCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDirectoryBrowseEnabledCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetDirectoryBrowseEnabledCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetDirectoryBrowseEnabledCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetDirectoryBrowseEnabledCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SetDirectoryBrowseEnabledCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SetEnterpriseFolderSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetStatisticsCompletedEventHandler(object sender, GetStatisticsCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public OrganizationStatistics Result - { - get - { + public OrganizationStatistics Result { + get { this.RaiseExceptionIfNecessary(); return ((OrganizationStatistics)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetStatisticsByOrganizationCompletedEventHandler(object sender, GetStatisticsByOrganizationCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetStatisticsByOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetStatisticsByOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetStatisticsByOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetStatisticsByOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public OrganizationStatistics Result - { - get - { + public OrganizationStatistics Result { + get { this.RaiseExceptionIfNecessary(); return ((OrganizationStatistics)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CreateMappedDriveCompletedEventHandler(object sender, CreateMappedDriveCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateMappedDriveCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class CreateMappedDriveCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CreateMappedDriveCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal CreateMappedDriveCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ResultObject Result - { - get - { + public ResultObject Result { + get { this.RaiseExceptionIfNecessary(); return ((ResultObject)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void DeleteMappedDriveCompletedEventHandler(object sender, DeleteMappedDriveCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteMappedDriveCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class DeleteMappedDriveCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal DeleteMappedDriveCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal DeleteMappedDriveCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ResultObject Result - { - get - { + public ResultObject Result { + get { this.RaiseExceptionIfNecessary(); return ((ResultObject)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetDriveMapsPagedCompletedEventHandler(object sender, GetDriveMapsPagedCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDriveMapsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetDriveMapsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetDriveMapsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetDriveMapsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public MappedDrivesPaged Result - { - get - { + public MappedDrivesPaged Result { + get { this.RaiseExceptionIfNecessary(); return ((MappedDrivesPaged)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetUsedDriveLettersCompletedEventHandler(object sender, GetUsedDriveLettersCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetUsedDriveLettersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetUsedDriveLettersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetUsedDriveLettersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetUsedDriveLettersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public string[] Result - { - get - { + public string[] Result { + get { this.RaiseExceptionIfNecessary(); return ((string[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetNotMappedEnterpriseFoldersCompletedEventHandler(object sender, GetNotMappedEnterpriseFoldersCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetNotMappedEnterpriseFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetNotMappedEnterpriseFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetNotMappedEnterpriseFoldersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetNotMappedEnterpriseFoldersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SystemFile[] Result - { - get - { + public SystemFile[] Result { + get { this.RaiseExceptionIfNecessary(); return ((SystemFile[])(this.results[0])); } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs index d7c81788..d7ace763 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs @@ -4330,6 +4330,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); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/EnterpriseStorage/EnterpriseStorageController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/EnterpriseStorage/EnterpriseStorageController.cs index ee4344fb..21cd276d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/EnterpriseStorage/EnterpriseStorageController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/EnterpriseStorage/EnterpriseStorageController.cs @@ -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(DataProvider.GetWebDavAccessTokenById(id)); + } + + public static WebDavAccessToken GetWebDavAccessTokenByAccessToken(Guid accessToken) + { + return ObjectUtils.FillObjectFromDataReader(DataProvider.GetWebDavAccessTokenByAccessToken(accessToken)); + } + #region Directory Browsing public static bool GetDirectoryBrowseEnabled(int itemId, string siteId) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esEnterpriseStorage.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esEnterpriseStorage.asmx.cs index 4a99f98b..deb4f45a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esEnterpriseStorage.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esEnterpriseStorage.asmx.cs @@ -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) diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/IAccessTokenManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/IAccessTokenManager.cs new file mode 100644 index 00000000..fb498205 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/IAccessTokenManager.cs @@ -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(); + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/IWebDavManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/IWebDavManager.cs index abbbaad0..2b8f7514 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/IWebDavManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/IWebDavManager.cs @@ -10,8 +10,5 @@ namespace WebsitePanel.WebDav.Core.Interfaces.Managers byte[] GetFileBytes(string path); IResource GetResource(string path); string GetFileUrl(string path); - - string CreateFileId(string path); - string FilePathFromId(string id); } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Security/IAuthenticationService.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Security/IAuthenticationService.cs index 771774f8..0cddd68c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Security/IAuthenticationService.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Security/IAuthenticationService.cs @@ -4,6 +4,7 @@ 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 @@ -11,9 +12,7 @@ namespace WebsitePanel.WebDav.Core.Interfaces.Security public interface IAuthenticationService { WspPrincipal LogIn(string login, string password); - WspPrincipal LogIn(string accessToken); void CreateAuthenticationTicket(WspPrincipal principal); - string CreateAccessToken(WspPrincipal principal); void LogOut(); } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/AccessTokenManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/AccessTokenManager.cs new file mode 100644 index 00000000..818a76a4 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/AccessTokenManager.cs @@ -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(); + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/WebDavManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/WebDavManager.cs index f6e43bd7..9815be79 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/WebDavManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/WebDavManager.cs @@ -164,16 +164,6 @@ namespace WebsitePanel.WebDav.Core.Managers return rootFolders; } - public string CreateFileId(string path) - { - return _cryptography.Encrypt(path).Replace("/", "AAAAA"); - } - - public string FilePathFromId(string id) - { - return _cryptography.Decrypt(id.Replace("AAAAA", "/")); - } - #region Helpers private byte[] ReadFully(Stream input) diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Security/Authentication/FormsAuthenticationService.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Security/Authentication/FormsAuthenticationService.cs index 05c523fa..6e27366a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Security/Authentication/FormsAuthenticationService.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Security/Authentication/FormsAuthenticationService.cs @@ -4,6 +4,7 @@ using System.Threading; using System.Web; using System.Web.Script.Serialization; using System.Web.Security; +using WebsitePanel.EnterpriseServer.Base.HostedSolution; using WebsitePanel.WebDav.Core.Config; using WebsitePanel.WebDav.Core.Interfaces.Security; using WebsitePanel.WebDav.Core.Security.Authentication.Principals; @@ -58,24 +59,6 @@ namespace WebsitePanel.WebDav.Core.Security.Authentication return principal; } - public WspPrincipal LogIn(string accessToken) - { - var token = _cryptography.Decrypt(accessToken.Replace("AAAAA", "/")); - - var splitResult = token.Split(':'); - - var login = splitResult[0]; - var password = _cryptography.Decrypt(splitResult[1]); - var expiration = DateTime.Parse(splitResult[2]); - - if (expiration < DateTime.Today) - { - return null; - } - - return LogIn(login, password); - } - public void CreateAuthenticationTicket(WspPrincipal principal) { var serializer = new JavaScriptSerializer(); @@ -96,13 +79,6 @@ namespace WebsitePanel.WebDav.Core.Security.Authentication HttpContext.Current.Response.Cookies.Add(cookie); } - public string CreateAccessToken(WspPrincipal principal) - { - var token = string.Format("{0}:{1}:{2}", principal.Login, principal.EncryptedPassword, DateTime.Now.ToShortDateString()); - - return _cryptography.Encrypt(token).Replace("/", "AAAAA"); - } - public void LogOut() { FormsAuthentication.SignOut(); diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Security/Authentication/Principals/WspPrincipal.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Security/Authentication/Principals/WspPrincipal.cs index e289b687..e70bb304 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Security/Authentication/Principals/WspPrincipal.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Security/Authentication/Principals/WspPrincipal.cs @@ -12,7 +12,6 @@ namespace WebsitePanel.WebDav.Core.Security.Authentication.Principals public int ItemId { get; set; } public string Login { get; set; } - public string EncryptedPassword { get; set; } public string DisplayName { get; set; } @@ -27,6 +26,8 @@ namespace WebsitePanel.WebDav.Core.Security.Authentication.Principals [XmlIgnore, ScriptIgnore] public IIdentity Identity { get; private set; } + public string EncryptedPassword { get; set; } + public WspPrincipal(string username) { Identity = new GenericIdentity(username);//new WindowsIdentity(username, "WindowsAuthentication"); diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj index 8f0667be..37d2fddd 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj @@ -127,6 +127,8 @@ + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs index 0b86bcc2..c8afc1e8 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs @@ -30,13 +30,13 @@ namespace WebsitePanel.WebDavPortal routes.MapRoute( name: OwaRouteNames.GetFile, - url: "owa/wopi*/files/{encodedPath}/contents", + url: "owa/wopi*/files/{accessTokenId}/contents", defaults: new { controller = "Owa", action = "GetFile" } ); routes.MapRoute( name: OwaRouteNames.CheckFileInfo, - url: "owa/wopi*/files/{encodedPath}", + url: "owa/wopi*/files/{accessTokenId}", defaults: new { controller = "Owa", action = "CheckFileInfo" } ); diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs index a18452a9..a5f0ce87 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs @@ -29,12 +29,14 @@ namespace WebsitePanel.WebDavPortal.Controllers private readonly ICryptography _cryptography; private readonly IWebDavManager _webdavManager; private readonly IAuthenticationService _authenticationService; + private readonly IAccessTokenManager _tokenManager; - public FileSystemController(ICryptography cryptography, IWebDavManager webdavManager, IAuthenticationService authenticationService) + public FileSystemController(ICryptography cryptography, IWebDavManager webdavManager, IAuthenticationService authenticationService, IAccessTokenManager tokenManager) { _cryptography = cryptography; _webdavManager = webdavManager; _authenticationService = authenticationService; + _tokenManager = tokenManager; } [HttpGet] @@ -73,11 +75,11 @@ namespace WebsitePanel.WebDavPortal.Controllers var owaOpener = WebDavAppConfigManager.Instance.OfficeOnline.Single(x => x.Extension == Path.GetExtension(pathPart)); string fileUrl = WebDavAppConfigManager.Instance.WebdavRoot+ org + "/" + pathPart.TrimStart('/'); - string accessToken = _authenticationService.CreateAccessToken(WspContext.User); + var accessToken = _tokenManager.CreateToken(WspContext.User, pathPart); - string wopiSrc = Server.UrlDecode(Url.RouteUrl(OwaRouteNames.CheckFileInfo, new { encodedPath = _webdavManager.CreateFileId(pathPart) }, Request.Url.Scheme)); + string wopiSrc = Server.UrlDecode(Url.RouteUrl(OwaRouteNames.CheckFileInfo, new { accessTokenId = accessToken.Id }, Request.Url.Scheme)); - var uri = string.Format("{0}/{1}?WOPISrc={2}&access_token={3}", WebDavAppConfigManager.Instance.OfficeOnline.Url, owaOpener.OwaOpener, Server.UrlEncode(wopiSrc), Server.UrlEncode(accessToken)); + var uri = string.Format("{0}/{1}?WOPISrc={2}&access_token={3}", WebDavAppConfigManager.Instance.OfficeOnline.Url, owaOpener.OwaOpener, Server.UrlEncode(wopiSrc), Server.UrlEncode(accessToken.AccessToken.ToString("N"))); return View(new OfficeOnlineModel(uri, new Uri(fileUrl).Segments.Last())); } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/OwaController.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/OwaController.cs index 5f6ba9ca..2a56a3c0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/OwaController.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/OwaController.cs @@ -1,12 +1,15 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Web; using System.Web.Mvc; +using WebsitePanel.EnterpriseServer.Base.HostedSolution; using WebsitePanel.WebDav.Core.Interfaces.Managers; using WebsitePanel.WebDav.Core.Interfaces.Owa; using WebsitePanel.WebDav.Core.Interfaces.Security; using WebsitePanel.WebDav.Core.Security.Cryptography; +using WebsitePanel.WebDav.Core.Wsp.Framework; namespace WebsitePanel.WebDavPortal.Controllers { @@ -16,28 +19,40 @@ namespace WebsitePanel.WebDavPortal.Controllers private readonly IWopiServer _wopiServer; private readonly IWebDavManager _webDavManager; private readonly IAuthenticationService _authenticationService; + private readonly IAccessTokenManager _tokenManager; + private readonly ICryptography _cryptography; + private WebDavAccessToken _token; - public OwaController(IWopiServer wopiServer, IWebDavManager webDavManager, IAuthenticationService authenticationService) + + public OwaController(IWopiServer wopiServer, IWebDavManager webDavManager, IAuthenticationService authenticationService, IAccessTokenManager tokenManager, ICryptography cryptography) { _wopiServer = wopiServer; _webDavManager = webDavManager; _authenticationService = authenticationService; + _tokenManager = tokenManager; + _cryptography = cryptography; } - public JsonResult CheckFileInfo( string encodedPath) + public ActionResult CheckFileInfo(int accessTokenId) { - var path = _webDavManager.FilePathFromId(encodedPath); + if (!CheckAccess(accessTokenId)) + { + return new HttpStatusCodeResult(HttpStatusCode.NoContent); + } - var fileInfo = _wopiServer.GetCheckFileInfo(path); + var fileInfo = _wopiServer.GetCheckFileInfo(_token.FilePath); return Json(fileInfo, JsonRequestBehavior.AllowGet); } - public FileResult GetFile(string encodedPath) + public ActionResult GetFile(int accessTokenId) { - var path = _webDavManager.FilePathFromId(encodedPath); + if (!CheckAccess(accessTokenId)) + { + return new HttpStatusCodeResult(HttpStatusCode.NoContent); + } - return _wopiServer.GetFile(path); + return _wopiServer.GetFile((_token.FilePath)); } protected override void OnActionExecuting(ActionExecutingContext filterContext) @@ -46,8 +61,26 @@ namespace WebsitePanel.WebDavPortal.Controllers if (!string.IsNullOrEmpty(Request["access_token"])) { - _authenticationService.LogIn(Request["access_token"]); + var guid = Guid.Parse((Request["access_token"])); + + _tokenManager.ClearExpiredTokens(); + + _token = _tokenManager.GetToken(guid); + + var user = WSP.Services.ExchangeServer.GetAccount(_token.ItemId, _token.AccountId); + + _authenticationService.LogIn(user.UserPrincipalName, _cryptography.Decrypt(_token.AuthData)); } } + + private bool CheckAccess(int accessTokenId) + { + if (_token == null || accessTokenId != _token.Id) + { + return false; + } + + return true; + } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/PortalDependencies.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/PortalDependencies.cs index 12c1cc62..b30572c9 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/PortalDependencies.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/PortalDependencies.cs @@ -25,6 +25,7 @@ namespace WebsitePanel.WebDavPortal.DependencyInjection kernel.Bind().To(); kernel.Bind().To(); kernel.Bind().To(); + kernel.Bind().To(); kernel.Bind().To(); } } From 2beacef40ed53ee5ca7016851e7fe52c2aa266d1 Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Fri, 16 Jan 2015 04:43:39 -0800 Subject: [PATCH 03/11] Webdav portal bugs fixe --- .../WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj index 37d2fddd..31145025 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj @@ -158,7 +158,6 @@ - From 67aab39780c3b93df4d5fd7f6049d4d43bd32503 Mon Sep 17 00:00:00 2001 From: vfedosevich Date: Fri, 16 Jan 2015 06:22:46 -0800 Subject: [PATCH 04/11] webdav protal bugs fixe --- .../Managers/WebDavManager.cs | 18 ++++++++++++++---- .../App_Start/RouteConfig.cs | 6 ++++++ .../Controllers/FileSystemController.cs | 17 +++++------------ .../Scripts/appScripts/uploadingData2.js | 4 ++-- .../UI/Routes/FileSystemRouteNames.cs | 1 + 5 files changed, 28 insertions(+), 18 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/WebDavManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/WebDavManager.cs index 9815be79..0f76a99e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/WebDavManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/WebDavManager.cs @@ -48,7 +48,7 @@ namespace WebsitePanel.WebDav.Core.Managers _cryptography.Decrypt(WspContext.User.EncryptedPassword), WebDavAppConfigManager.Instance.UserDomain); - _currentFolder = _webDavSession.OpenFolder(string.Format("{0}{1}/{2}",WebDavAppConfigManager.Instance.WebdavRoot, WspContext.User.OrganizationId , pathPart)); + _currentFolder = _webDavSession.OpenFolder(string.Format("{0}{1}/{2}", WebDavAppConfigManager.Instance.WebdavRoot, WspContext.User.OrganizationId, pathPart)); } children = _currentFolder.GetChildren(); @@ -73,9 +73,15 @@ namespace WebsitePanel.WebDav.Core.Managers OpenFolder(folder); - IResource resource = _currentFolder.GetResource(resourceName); + try + { + IResource resource = _currentFolder.GetResource(resourceName); - return resource.ItemType == ItemType.Resource; + return true; + } + catch (Exception e){} + + return false; } @@ -180,6 +186,8 @@ namespace WebsitePanel.WebDav.Core.Managers private string GetFileFolder(string path) { + path = path.TrimEnd('/'); + if (string.IsNullOrEmpty(path) || !path.Contains('/')) { return string.Empty; @@ -187,13 +195,15 @@ namespace WebsitePanel.WebDav.Core.Managers string fileName = path.Split('/').Last(); int index = path.LastIndexOf(fileName, StringComparison.InvariantCultureIgnoreCase); - string folder = path.Remove(index - 1, fileName.Length + 1); + 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; diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs index c8afc1e8..8a6a2d90 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs @@ -48,6 +48,12 @@ namespace WebsitePanel.WebDavPortal defaults: new { controller = "FileSystem", action = "ShowOfficeDocument", pathPart = UrlParameter.Optional } ); + routes.MapRoute( + name: FileSystemRouteNames.ShowAdditionalContent, + url: "show-additional-content/{*path}", + defaults: new { controller = "FileSystem", action = "ShowAdditionalContent", path = UrlParameter.Optional } + ); + routes.MapRoute( name: FileSystemRouteNames.FilePath, url: "{org}/{*pathPart}", diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs index a5f0ce87..70bdfe36 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs @@ -85,22 +85,15 @@ namespace WebsitePanel.WebDavPortal.Controllers } [HttpPost] - public ActionResult ShowAdditionalContent(string path) + public ActionResult ShowAdditionalContent(string path = "", int resourseRenderCount = 0) { - if (Session[WebDavAppConfigManager.Instance.SessionKeys.ResourseRenderCount] != null) - { - var renderedElementsCount = (int)Session[WebDavAppConfigManager.Instance.SessionKeys.ResourseRenderCount]; + path = path.Replace(WspContext.User.OrganizationId, "").Trim('/'); - IEnumerable children = _webdavManager.OpenFolder(path); + IEnumerable children = _webdavManager.OpenFolder(path); - var result = children.Skip(renderedElementsCount).Take(WebDavAppConfigManager.Instance.ElementsRendering.AddElementsCount); + var result = children.Skip(resourseRenderCount).Take(WebDavAppConfigManager.Instance.ElementsRendering.AddElementsCount); - Session[WebDavAppConfigManager.Instance.SessionKeys.ResourseRenderCount] = renderedElementsCount + WebDavAppConfigManager.Instance.ElementsRendering.AddElementsCount; - - return PartialView("_ResourseCollectionPartial", result); - } - - return new HttpStatusCodeResult(HttpStatusCode.NoContent); + return PartialView("_ResourseCollectionPartial", result); } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/appScripts/uploadingData2.js b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/appScripts/uploadingData2.js index cd9dd1d2..f9c7ef4f 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/appScripts/uploadingData2.js +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/appScripts/uploadingData2.js @@ -14,8 +14,8 @@ var oldResourcesDivHeight = $('#resourcesDiv').height(); function GetResources() { $.ajax({ type: 'POST', - url: '/FileSystem/ShowAdditionalContent', - data: { path: window.location.pathname }, + url: '/show-additional-content', + data: { path: window.location.pathname, resourseRenderCount: $(".element-container").length }, dataType: "html", success: function (result) { var domElement = $(result); diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Routes/FileSystemRouteNames.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Routes/FileSystemRouteNames.cs index 80d0d67d..f011561a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Routes/FileSystemRouteNames.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Routes/FileSystemRouteNames.cs @@ -8,5 +8,6 @@ namespace WebsitePanel.WebDavPortal.UI.Routes public class FileSystemRouteNames { public const string FilePath = "FilePathRoute"; + public const string ShowAdditionalContent = "ShowAdditionalContentRoute"; } } \ No newline at end of file From a231dd0464016a5f393763e31dfbb81daaacca3b Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Fri, 16 Jan 2015 10:12:04 -0500 Subject: [PATCH 05/11] Added tag build-2.1.0.534 for changeset 9b89f381586f From fc37d5f31014cfc8071c257d7f492a537c43ce28 Mon Sep 17 00:00:00 2001 From: Alexander Trofimov Date: Sat, 17 Jan 2015 01:32:10 +0700 Subject: [PATCH 06/11] =?UTF-8?q?wsp-10285=20Add=20the=20symbol=20?= =?UTF-8?q?=E2=80=9C=5F=E2=80=9D=20in=20the=20category=20of=20Non-alphanum?= =?UTF-8?q?eric=20symbols?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WebsitePanel/UserControls/PasswordControl.ascx.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx.cs index ccd7e451..15473082 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx.cs @@ -220,7 +220,7 @@ namespace WebsitePanel.Portal function wspValidatePasswordSymbols(source, args) { if(args.Value == source.getAttribute('dpsw')) return true; - args.IsValid = wspValidatePattern(/(\W)/g, args.Value, + args.IsValid = wspValidatePattern(/([\W_])/g, args.Value, parseInt(source.getAttribute('minimumNumber'))); } @@ -357,7 +357,7 @@ namespace WebsitePanel.Portal protected void valRequireSymbols_ServerValidate(object source, ServerValidateEventArgs args) { - args.IsValid = ((args.Value == EMPTY_PASSWORD) || ValidatePattern("(\\W)", args.Value, MinimumSymbols)); + args.IsValid = ((args.Value == EMPTY_PASSWORD) || ValidatePattern("([\\W_])", args.Value, MinimumSymbols)); } private bool ValidatePattern(string regexp, string val, int minimumNumber) From 1bdccbc8d050f3a9fa864799b7b8996a7eae4b42 Mon Sep 17 00:00:00 2001 From: Olov Karlsson Date: Sat, 17 Jan 2015 17:41:31 +0100 Subject: [PATCH 07/11] IDN-related fix, cannot add subdomain, etc --- .../DesktopModules/WebsitePanel/DomainsAddDomain.ascx | 2 +- .../WebsitePanel/DomainsAddDomain.ascx.cs | 10 ++++------ .../WebsitePanel/UserControls/DomainControl.ascx.cs | 10 +++++++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx index 7555cf13..deff19e5 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx @@ -10,7 +10,7 @@

- +

Date: Sat, 17 Jan 2015 18:06:25 -0500 Subject: [PATCH 08/11] Added tag build-2.1.0.535 for changeset f0763afa8c52 From a23078fd6eaea11958675ea9908f93edb6cba6b2 Mon Sep 17 00:00:00 2001 From: Alexander Trofimov Date: Sun, 18 Jan 2015 18:58:20 +0700 Subject: [PATCH 09/11] Local settings --- .../WebsitePanel.EnterpriseServer/Web.config | 14 ++-- .../Sources/WebsitePanel.Server/Web.config | 72 +------------------ .../WebsitePanel.Server.csproj | 10 +-- .../WebsitePanel.WebDav.Core.csproj | 2 +- .../WebsitePanel.WebDav.Core/packages.config | 1 + .../App_Data/SiteSettings.config | 2 +- .../WebsitePanel.WebPortal.csproj | 7 +- .../WebsitePanel.WebPortal/packages.config | 4 ++ 8 files changed, 27 insertions(+), 85 deletions(-) create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/packages.config diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config index 2c00ab71..b3a15388 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config @@ -6,21 +6,21 @@ - + - + - + - + - - - + + + diff --git a/WebsitePanel/Sources/WebsitePanel.Server/Web.config b/WebsitePanel/Sources/WebsitePanel.Server/Web.config index d9d1bde5..feb5ab1c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/Web.config +++ b/WebsitePanel/Sources/WebsitePanel.Server/Web.config @@ -5,17 +5,6 @@
- - - -
-
-
-
- -
- - @@ -55,7 +44,7 @@ - + @@ -74,29 +63,8 @@ - - - - - - - - - - - - - - - - - - - - - - - + + @@ -137,41 +105,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WebsitePanel/Sources/WebsitePanel.Server/WebsitePanel.Server.csproj b/WebsitePanel/Sources/WebsitePanel.Server/WebsitePanel.Server.csproj index 8b1d2bb6..4ba51d1d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/WebsitePanel.Server.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Server/WebsitePanel.Server.csproj @@ -17,9 +17,9 @@ 4.0 - v3.5 + v4.0 - false + true @@ -79,6 +79,7 @@ + @@ -271,12 +272,11 @@ - False + True False 9004 / - - + http://localhost:9003/ False False diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj index 31145025..466bf922 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj @@ -41,7 +41,7 @@ False - ..\..\..\..\Scheduler Domains\WebsitePanel\Bin\Microsoft.Web.Services3.dll + ..\packages\Microsoft.Web.Services3.3.0.0.0\lib\net20\Microsoft.Web.Services3.dll True diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/packages.config b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/packages.config index ad6a1af2..367f50f4 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/packages.config +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/packages.config @@ -5,4 +5,5 @@ + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SiteSettings.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SiteSettings.config index 91a5447b..2977e729 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SiteSettings.config +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SiteSettings.config @@ -3,7 +3,7 @@ WebsitePanel - http://127.0.0.1:9555 + http://localhost:9002 UserCulture UserTheme diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj index 3c33cdbb..d2a71c61 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj @@ -24,6 +24,8 @@ + ..\ + true true @@ -74,8 +76,7 @@ False - ..\..\Lib\Microsoft.Web.Services3.dll - True + ..\packages\Microsoft.Web.Services3.3.0.0.0\lib\net20\Microsoft.Web.Services3.dll @@ -292,6 +293,7 @@ + @@ -802,4 +804,5 @@ + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/packages.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/packages.config new file mode 100644 index 00000000..9bda2c64 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file From 39c5356501b4bcf2de03eb2fe33dcc8e541355a5 Mon Sep 17 00:00:00 2001 From: Alexander Trofimov Date: Mon, 19 Jan 2015 18:50:45 +0700 Subject: [PATCH 10/11] The fix of the redirection after editing the IP Address in a edit server page --- .../WebsitePanel/Code/Framework/Utils.cs | 17 +++++++++++++++++ .../IPAddressesAddIPAddress.ascx.cs | 9 ++++++++- .../IPAddressesEditIPAddress.ascx.cs | 9 ++++++++- .../WebsitePanel/ServerIPAddressesControl.ascx | 2 +- .../ServerIPAddressesControl.ascx.cs | 8 +++++++- .../WebsitePanel/ServersEditServer.ascx.cs | 10 ++++++++++ 6 files changed, 51 insertions(+), 4 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Framework/Utils.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Framework/Utils.cs index 56b27c79..2285cd13 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Framework/Utils.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Framework/Utils.cs @@ -327,5 +327,22 @@ namespace WebsitePanel.Portal var idn = new IdnMapping(); return idn.GetAscii(domainName); } + + /// + /// Adds the specified parameter to the Query String. + /// + /// + /// Name of the parameter to add. + /// Value for the parameter to add. + /// Url with added parameter. + public static Uri AddParameterToUrl(Uri url, string paramName, string paramValue) + { + var uriBuilder = new UriBuilder(url); + var query = HttpUtility.ParseQueryString(uriBuilder.Query); + query[paramName] = paramValue; + uriBuilder.Query = query.ToString(); + + return new Uri(uriBuilder.ToString()); + } } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/IPAddressesAddIPAddress.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/IPAddressesAddIPAddress.ascx.cs index d4df6d54..46fff296 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/IPAddressesAddIPAddress.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/IPAddressesAddIPAddress.ascx.cs @@ -149,7 +149,14 @@ namespace WebsitePanel.Portal private void RedirectBack() { - Response.Redirect(NavigateURL("PoolID", ddlPools.SelectedValue)); + var returnUrl = Request["ReturnUrl"]; + + if (string.IsNullOrEmpty(returnUrl)) + { + returnUrl = NavigateURL("PoolID", ddlPools.SelectedValue); + } + + Response.Redirect(returnUrl); } protected void ddlPools_SelectedIndexChanged(object sender, EventArgs e) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/IPAddressesEditIPAddress.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/IPAddressesEditIPAddress.ascx.cs index 7ac5711a..c3cea0fd 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/IPAddressesEditIPAddress.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/IPAddressesEditIPAddress.ascx.cs @@ -107,7 +107,14 @@ namespace WebsitePanel.Portal private void RedirectBack() { - Response.Redirect(NavigateURL("PoolID", ddlPools.SelectedValue)); + var returnUrl = Request["ReturnUrl"]; + + if (string.IsNullOrEmpty(returnUrl)) + { + returnUrl = NavigateURL("PoolID", ddlPools.SelectedValue); + } + + Response.Redirect(returnUrl); } protected void btnUpdate_Click(object sender, EventArgs e) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServerIPAddressesControl.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServerIPAddressesControl.ascx index 4c63c10d..8df5d222 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServerIPAddressesControl.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServerIPAddressesControl.ascx @@ -11,7 +11,7 @@ - + <%# Eval("ExternalIP") %> diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServerIPAddressesControl.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServerIPAddressesControl.ascx.cs index 44c7de99..6718425e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServerIPAddressesControl.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServerIPAddressesControl.ascx.cs @@ -55,9 +55,15 @@ namespace WebsitePanel.Portal return HostModule.EditUrl(key, keyVal, ctrlKey, key2 + "=" + keyVal2); } + public string GetReturnUrl() + { + var returnUrl = Utils.AddParameterToUrl(Request.Url, "IpAddressesCollapsed", "False"); + return Uri.EscapeDataString("~" + returnUrl.PathAndQuery); + } + protected void btnAdd_Click(object sender, EventArgs e) { - Response.Redirect(HostModule.EditUrl("ServerID", PanelRequest.ServerId.ToString(), "add_ip"), true); + Response.Redirect(EditModuleUrl("ServerID", PanelRequest.ServerId.ToString(), "add_ip", "ReturnUrl", GetReturnUrl()), true); } } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditServer.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditServer.ascx.cs index e9d268e6..c31abfbd 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditServer.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ServersEditServer.ascx.cs @@ -59,6 +59,8 @@ namespace WebsitePanel.Portal return; } } + + IPAddressesHeader.IsCollapsed = IsIpAddressesCollapsed; } private void BindTools() @@ -232,5 +234,13 @@ namespace WebsitePanel.Portal return; } } + + protected bool IsIpAddressesCollapsed + { + get + { + return PanelRequest.GetBool("IpAddressesCollapsed", true); + } + } } } From b2db22b8d899ff3d35a5b338be5bac7eef65efb4 Mon Sep 17 00:00:00 2001 From: Virtuworks Date: Mon, 19 Jan 2015 08:52:14 -0500 Subject: [PATCH 11/11] Added tag build-2.1.0.536 for changeset 75bef5b3eb9b