From 4c75df5a73b09e152cfe7cc79454f0dfc4c75d36 Mon Sep 17 00:00:00 2001 From: robvde Date: Sat, 24 Nov 2012 11:39:42 +0400 Subject: [PATCH] Added change user principalName Added button to change user password Changes EmailAddresses, user principal name disabled --- WebsitePanel/Database/update_db.sql | 21 ++ .../ExchangeServer/ExchangeEmailAddress.cs | 8 + .../OrganizationProxy.cs | 162 ++++++++++++++- .../Code/Data/DataProvider.cs | 10 + .../ExchangeServerController.cs | 7 +- .../HostedSolution/OrganizationController.cs | 172 +++++++++++++++- .../esOrganizations.asmx.cs | 16 ++ .../HostedSolution/ExchangeEmailAddress.cs | 2 + .../HostedSolution/IOrganization.cs | 4 + .../OrganizationProvider.cs | 193 ++++++++++-------- .../OrganizationProxy.cs | 156 ++++++++++++-- .../WebsitePanel.Server/Organizations.asmx.cs | 14 ++ .../WebsitePanel_SharedResources.ascx.resx | 13 ++ .../OrganizationUserGeneralSettings.ascx.resx | 9 + .../ExchangeMailboxEmailAddresses.ascx | 4 +- ...angeMailboxEmailAddresses.ascx.designer.cs | 9 - .../OrganizationUserGeneralSettings.ascx | 28 ++- .../OrganizationUserGeneralSettings.ascx.cs | 119 +++++++++-- ...zationUserGeneralSettings.ascx.designer.cs | 40 +++- WebsitePanel/Sources/generate_es_proxies.bat | 8 +- .../Sources/generate_server_proxies.bat | 8 +- 21 files changed, 850 insertions(+), 153 deletions(-) diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index 9c756686..ad4b79c9 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -6964,3 +6964,24 @@ BEGIN INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (230, 13, 4, N'HostedSolution.AllowChangeUPN', N'Allow to Change UserPrincipalName', 1, 0, NULL) END GO + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'UpdateExchangeAccountUserPrincipalName') +BEGIN +EXEC sp_executesql N' CREATE PROCEDURE [dbo].[UpdateExchangeAccountUserPrincipalName] +( + @AccountID int, + @UserPrincipalName nvarchar(300) +) +AS + +UPDATE ExchangeAccounts SET + UserPrincipalName = @UserPrincipalName +WHERE + AccountID = @AccountID + +RETURN' +END +GO diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/ExchangeServer/ExchangeEmailAddress.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/ExchangeServer/ExchangeEmailAddress.cs index 0eccbbc1..24eb5d80 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/ExchangeServer/ExchangeEmailAddress.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/ExchangeServer/ExchangeEmailAddress.cs @@ -36,6 +36,7 @@ namespace WebsitePanel.EnterpriseServer { string emailAddress; bool isPrimary; + bool iSuserPrincipalName; public string EmailAddress { @@ -48,5 +49,12 @@ namespace WebsitePanel.EnterpriseServer get { return this.isPrimary; } set { this.isPrimary = value; } } + + public bool IsUserPrincipalName + { + get { return iSuserPrincipalName; } + set { iSuserPrincipalName = value; } + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs index fe8a4b6e..87b2169c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs @@ -29,7 +29,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.6387 +// Runtime Version:2.0.50727.6400 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -54,7 +54,6 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { using WebsitePanel.Providers.ResultObjects; - /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] @@ -104,6 +103,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { private System.Threading.SendOrPostCallback SetUserGeneralSettingsOperationCompleted; + private System.Threading.SendOrPostCallback SetUserPrincipalNameOperationCompleted; + + private System.Threading.SendOrPostCallback SetUserPasswordOperationCompleted; + private System.Threading.SendOrPostCallback SearchAccountsOperationCompleted; private System.Threading.SendOrPostCallback DeleteUserOperationCompleted; @@ -175,6 +178,12 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { /// public event SetUserGeneralSettingsCompletedEventHandler SetUserGeneralSettingsCompleted; + /// + public event SetUserPrincipalNameCompletedEventHandler SetUserPrincipalNameCompleted; + + /// + public event SetUserPasswordCompletedEventHandler SetUserPasswordCompleted; + /// public event SearchAccountsCompletedEventHandler SearchAccountsCompleted; @@ -1336,6 +1345,103 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { } } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserPrincipalName", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetUserPrincipalName(int itemId, int accountId, string userPrincipalName, bool inherit) { + object[] results = this.Invoke("SetUserPrincipalName", new object[] { + itemId, + accountId, + userPrincipalName, + inherit}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginSetUserPrincipalName(int itemId, int accountId, string userPrincipalName, bool inherit, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SetUserPrincipalName", new object[] { + itemId, + accountId, + userPrincipalName, + inherit}, callback, asyncState); + } + + /// + public int EndSetUserPrincipalName(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void SetUserPrincipalNameAsync(int itemId, int accountId, string userPrincipalName, bool inherit) { + this.SetUserPrincipalNameAsync(itemId, accountId, userPrincipalName, inherit, null); + } + + /// + public void SetUserPrincipalNameAsync(int itemId, int accountId, string userPrincipalName, bool inherit, object userState) { + if ((this.SetUserPrincipalNameOperationCompleted == null)) { + this.SetUserPrincipalNameOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserPrincipalNameOperationCompleted); + } + this.InvokeAsync("SetUserPrincipalName", new object[] { + itemId, + accountId, + userPrincipalName, + inherit}, this.SetUserPrincipalNameOperationCompleted, userState); + } + + private void OnSetUserPrincipalNameOperationCompleted(object arg) { + if ((this.SetUserPrincipalNameCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetUserPrincipalNameCompleted(this, new SetUserPrincipalNameCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserPassword", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetUserPassword(int itemId, int accountId, string password) { + object[] results = this.Invoke("SetUserPassword", new object[] { + itemId, + accountId, + password}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginSetUserPassword(int itemId, int accountId, string password, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SetUserPassword", new object[] { + itemId, + accountId, + password}, callback, asyncState); + } + + /// + public int EndSetUserPassword(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void SetUserPasswordAsync(int itemId, int accountId, string password) { + this.SetUserPasswordAsync(itemId, accountId, password, null); + } + + /// + public void SetUserPasswordAsync(int itemId, int accountId, string password, object userState) { + if ((this.SetUserPasswordOperationCompleted == null)) { + this.SetUserPasswordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserPasswordOperationCompleted); + } + this.InvokeAsync("SetUserPassword", new object[] { + itemId, + accountId, + password}, this.SetUserPasswordOperationCompleted, userState); + } + + private void OnSetUserPasswordOperationCompleted(object arg) { + if ((this.SetUserPasswordCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetUserPasswordCompleted(this, new SetUserPasswordCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SearchAccounts", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public OrganizationUser[] SearchAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes) { @@ -2000,6 +2106,58 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { } } + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void SetUserPrincipalNameCompletedEventHandler(object sender, SetUserPrincipalNameCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetUserPrincipalNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal SetUserPrincipalNameCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void SetUserPasswordCompletedEventHandler(object sender, SetUserPasswordCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetUserPasswordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal SetUserPasswordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SearchAccountsCompletedEventHandler(object sender, SearchAccountsCompletedEventArgs e); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs index 93935dfb..a92f6776 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs @@ -2354,6 +2354,16 @@ namespace WebsitePanel.EnterpriseServer ); } + public static void UpdateExchangeAccountUserPrincipalName(int accountId, string userPrincipalName) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "UpdateExchangeAccountUserPrincipalName", + new SqlParameter("@AccountID", accountId), + new SqlParameter("@UserPrincipalName", userPrincipalName)); + } + public static IDataReader GetExchangeAccount(int itemId, int accountId) { return SqlHelper.ExecuteReader( diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs index 2c0c761d..e012ee65 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs @@ -1313,8 +1313,13 @@ namespace WebsitePanel.EnterpriseServer if (String.Compare(account.PrimaryEmailAddress, email.EmailAddress, true) == 0) { email.IsPrimary = true; - break; } + + if (String.Compare(account.UserPrincipalName, email.EmailAddress, true) == 0) + { + email.IsUserPrincipalName = true; + } + } return emails.ToArray(); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs index bcb9d185..17c5c573 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs @@ -41,6 +41,7 @@ using WebsitePanel.Providers.ResultObjects; using WebsitePanel.Providers.SharePoint; using WebsitePanel.Providers.Common; using WebsitePanel.Providers.DNS; +using WebsitePanel.Providers.OCS; using System.IO; using System.Xml; @@ -1670,7 +1671,7 @@ namespace WebsitePanel.EnterpriseServer if (accountCheck < 0) return accountCheck; // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_MAILBOX_GENERAL"); + TaskManager.StartTask("ORGANIZATION", "UPDATE_USER_GENERAL"); TaskManager.ItemId = itemId; try @@ -1752,6 +1753,162 @@ namespace WebsitePanel.EnterpriseServer } } + + public static int SetUserPrincipalName(int itemId, int accountId, string userPrincipalName, bool inherit) + { + + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + + // place log record + TaskManager.StartTask("ORGANIZATION", "SET_USER_USERPRINCIPALNAME"); + TaskManager.ItemId = itemId; + + try + { + + + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return -1; + + // check package + int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) return packageCheck; + + // load account + OrganizationUser user = GetUserGeneralSettings(itemId, accountId); + + if (user.UserPrincipalName != userPrincipalName) + { + bool userPrincipalNameOwned = false; + ExchangeEmailAddress[] emails = ExchangeServerController.GetMailboxEmailAddresses(itemId, accountId); + + foreach (ExchangeEmailAddress mail in emails) + { + if (mail.EmailAddress == userPrincipalName) + { + userPrincipalNameOwned = true; + break; + } + } + + if (!userPrincipalNameOwned) + { + if (EmailAddressExists(userPrincipalName)) + return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; + } + } + + Organizations orgProxy = GetOrganizationProxy(org.ServiceId); + + orgProxy.SetUserPrincipalName(org.OrganizationId, + user.AccountName, + userPrincipalName.ToLower()); + + DataProvider.UpdateExchangeAccountUserPrincipalName(accountId, userPrincipalName.ToLower()); + + if (inherit) + { + if (user.AccountType == ExchangeAccountType.Mailbox) + { + ExchangeServerController.AddMailboxEmailAddress(itemId, accountId, userPrincipalName.ToLower()); + ExchangeServerController.SetMailboxPrimaryEmailAddress(itemId, accountId, userPrincipalName.ToLower()); + } + else + { + if (user.IsLyncUser) + { + if (!DataProvider.LyncUserExists(accountId, userPrincipalName.ToLower())) + { + LyncController.SetLyncUserGeneralSettings(itemId, accountId, userPrincipalName.ToLower(), null); + } + } + else + { + if (user.IsOCSUser) + { + OCSServer ocs = GetOCSProxy(itemId); + string instanceId = DataProvider.GetOCSUserInstanceID(user.AccountId); + ocs.SetUserPrimaryUri(instanceId, userPrincipalName.ToLower()); + } + } + } + } + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + + } + + + public static int SetUserPassword(int itemId, int accountId, string password) + { + + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + // place log record + TaskManager.StartTask("ORGANIZATION", "SET_USER_PASSWORD"); + TaskManager.ItemId = itemId; + + try + { + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return -1; + + // check package + int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) return packageCheck; + + // load account + ExchangeAccount account = ExchangeServerController.GetAccount(itemId, accountId); + + string accountName = GetAccountName(account.AccountName); + + Organizations orgProxy = GetOrganizationProxy(org.ServiceId); + + orgProxy.SetUserPassword( org.OrganizationId, + accountName, + password); + + //account. + if (!String.IsNullOrEmpty(password)) + account.AccountPassword = CryptoUtils.Encrypt(password); + else + account.AccountPassword = null; + + UpdateAccount(account); + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + + private static void UpdateAccount(ExchangeAccount account) { DataProvider.UpdateExchangeAccount(account.AccountId, account.AccountName, account.AccountType, account.DisplayName, @@ -1969,6 +2126,19 @@ namespace WebsitePanel.EnterpriseServer } return res; } + + private static OCSServer GetOCSProxy(int itemId) + { + Organization org = OrganizationController.GetOrganization(itemId); + int serviceId = PackageController.GetPackageServiceId(org.PackageId, ResourceGroups.OCS); + + OCSServer ocs = new OCSServer(); + ServiceProviderProxy.Init(ocs, serviceId); + + + return ocs; + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs index 38acbebf..cc4a6b85 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs @@ -195,6 +195,22 @@ namespace WebsitePanel.EnterpriseServer } + [WebMethod] + public int SetUserPrincipalName(int itemId, int accountId, string userPrincipalName, bool inherit) + { + return OrganizationController.SetUserPrincipalName(itemId, accountId, userPrincipalName, + inherit); + } + + + [WebMethod] + public int SetUserPassword(int itemId, int accountId, string password) + { + return OrganizationController.SetUserPassword(itemId, accountId, password); + } + + + [WebMethod] public List SearchAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeEmailAddress.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeEmailAddress.cs index 0db794cd..c16d9d09 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeEmailAddress.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeEmailAddress.cs @@ -58,5 +58,7 @@ namespace WebsitePanel.Providers.HostedSolution get { return primary; } set { primary = value; } } + + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs index 15846f9c..e3ce875d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs @@ -51,6 +51,10 @@ namespace WebsitePanel.Providers.HostedSolution string businessPhone, string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes, string externalEmail); + void SetUserPassword(string organizationId, string accountName, string password); + + void SetUserPrincipalName(string organizationId, string accountName, string userPrincipalName); + bool OrganizationExists(string organizationId); void DeleteOrganizationDomain(string organizationDistinguishedName, string domain); diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs index 147bfdd1..782b59d0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs @@ -43,13 +43,13 @@ namespace WebsitePanel.Providers.HostedSolution private string RootOU { get { return ProviderSettings["RootOU"]; } - } + } private string RootDomain { get { return ServerSettings.ADRootDomain; } } - + private string PrimaryDomainController { get { return ProviderSettings["PrimaryDomainController"]; } @@ -68,7 +68,7 @@ namespace WebsitePanel.Providers.HostedSolution AppendProtocol(sb); AppendDomainController(sb); AppendOUPath(sb, organizationId); - AppendOUPath(sb, RootOU); + AppendOUPath(sb, RootOU); AppendDomainPath(sb, RootDomain); return sb.ToString(); @@ -118,20 +118,20 @@ namespace WebsitePanel.Providers.HostedSolution { sb.Append(PrimaryDomainController + "/"); } - + private static void AppendCNPath(StringBuilder sb, string organizationId) { if (string.IsNullOrEmpty(organizationId)) return; - + sb.Append("CN=").Append(organizationId).Append(","); } - + private static void AppendProtocol(StringBuilder sb) { sb.Append("LDAP://"); } - + private static void AppendOUPath(StringBuilder sb, string ou) { if (string.IsNullOrEmpty(ou)) @@ -168,29 +168,29 @@ namespace WebsitePanel.Providers.HostedSolution { return OrganizationExistsInternal(organizationId); } - + internal bool OrganizationExistsInternal(string organizationId) { if (string.IsNullOrEmpty(organizationId)) throw new ArgumentNullException("organizationId"); - + string orgPath = GetOrganizationPath(organizationId); return ActiveDirectoryUtils.AdObjectExists(orgPath); } - + public Organization CreateOrganization(string organizationId) { - return CreateOrganizationInternal(organizationId); + return CreateOrganizationInternal(organizationId); } - + internal Organization CreateOrganizationInternal(string organizationId) { HostedSolutionLog.LogStart("CreateOrganizationInternal"); HostedSolutionLog.DebugInfo("OrganizationId : {0}", organizationId); - + if (string.IsNullOrEmpty(organizationId)) throw new ArgumentNullException("organizationId"); - + bool ouCreated = false; bool groupCreated = false; @@ -203,18 +203,18 @@ namespace WebsitePanel.Providers.HostedSolution //Create OU ActiveDirectoryUtils.CreateOrganizationalUnit(organizationId, parentPath); ouCreated = true; - + //Create security group ActiveDirectoryUtils.CreateGroup(orgPath, organizationId); groupCreated = true; - - + + org = new Organization(); org.OrganizationId = organizationId; org.DistinguishedName = ActiveDirectoryUtils.RemoveADPrefix(orgPath); - org.SecurityGroup = ActiveDirectoryUtils.RemoveADPrefix(GetGroupPath(organizationId)); + org.SecurityGroup = ActiveDirectoryUtils.RemoveADPrefix(GetGroupPath(organizationId)); } - catch(Exception ex) + catch (Exception ex) { HostedSolutionLog.LogError(ex); try @@ -225,7 +225,7 @@ namespace WebsitePanel.Providers.HostedSolution ActiveDirectoryUtils.DeleteADObject(groupPath); } } - catch(Exception e) + catch (Exception e) { HostedSolutionLog.LogError(e); } @@ -238,21 +238,21 @@ namespace WebsitePanel.Providers.HostedSolution ActiveDirectoryUtils.DeleteADObject(orgPath); } } - catch(Exception e) + catch (Exception e) { HostedSolutionLog.LogError(e); } throw; } - + HostedSolutionLog.LogEnd("CreateOrganizationInternal"); - - return org; + + return org; } public override void ChangeServiceItemsState(ServiceProviderItem[] items, bool enabled) - { + { foreach (ServiceProviderItem item in items) { @@ -261,7 +261,7 @@ namespace WebsitePanel.Providers.HostedSolution if (item is Organization) { Organization org = item as Organization; - ChangeOrganizationState(org, enabled); + ChangeOrganizationState(org, enabled); } } catch (Exception ex) @@ -281,7 +281,7 @@ namespace WebsitePanel.Providers.HostedSolution string.Format(CultureInfo.InvariantCulture, "(&(objectClass=user)(!{0}=disabled))", ADAttributes.CustomAttribute2); using (DirectorySearcher searcher = new DirectorySearcher(entry, filter)) - { + { SearchResultCollection resCollection = searcher.FindAll(); foreach (SearchResult res in resCollection) { @@ -303,21 +303,21 @@ namespace WebsitePanel.Providers.HostedSolution Organization org = item as Organization; DeleteOrganizationInternal(org.OrganizationId); } - + } catch (Exception ex) { HostedSolutionLog.LogError(String.Format("Error deleting '{0}' {1}", item.Name, item.GetType().Name), ex); } } - + } - + public void DeleteOrganization(string organizationId) - { + { DeleteOrganizationInternal(organizationId); } - + internal void DeleteOrganizationInternal(string organizationId) { HostedSolutionLog.LogStart("DeleteOrganizationInternal"); @@ -328,11 +328,11 @@ namespace WebsitePanel.Providers.HostedSolution string groupPath = GetGroupPath(organizationId); ActiveDirectoryUtils.DeleteADObject(groupPath); - - string path = GetOrganizationPath(organizationId); + + string path = GetOrganizationPath(organizationId); ActiveDirectoryUtils.DeleteADObject(path, true); - + HostedSolutionLog.LogEnd("DeleteOrganizationInternal"); } @@ -416,12 +416,12 @@ namespace WebsitePanel.Providers.HostedSolution { return GetPasswordPolicyInternal(); } - + internal PasswordPolicyResult GetPasswordPolicyInternal() { HostedSolutionLog.LogStart("GetPasswordPolicyInternal"); - PasswordPolicyResult res = new PasswordPolicyResult {IsSuccess = true}; + PasswordPolicyResult res = new PasswordPolicyResult { IsSuccess = true }; string[] policyAttributes = new[] {"minPwdLength", "pwdProperties", @@ -437,30 +437,30 @@ namespace WebsitePanel.Providers.HostedSolution SearchScope.Base ); - + SearchResult result = ds.FindOne(); PasswordPolicy ret = new PasswordPolicy - { - MinLength = ((int) result.Properties["minPwdLength"][0]), - IsComplexityEnable = ((int) result.Properties["pwdProperties"][0] == 1) - }; - res.Value = ret; + { + MinLength = ((int)result.Properties["minPwdLength"][0]), + IsComplexityEnable = ((int)result.Properties["pwdProperties"][0] == 1) + }; + res.Value = ret; } - catch(Exception ex) + catch (Exception ex) { HostedSolutionLog.LogError(ex); res.IsSuccess = false; - res.ErrorCodes.Add(ErrorCodes.CANNOT_GET_PASSWORD_COMPLEXITY); + res.ErrorCodes.Add(ErrorCodes.CANNOT_GET_PASSWORD_COMPLEXITY); } - HostedSolutionLog.LogEnd("GetPasswordPolicyInternal"); + HostedSolutionLog.LogEnd("GetPasswordPolicyInternal"); return res; } - + public void DeleteUser(string loginName, string organizationId) - { + { DeleteUserInternal(loginName, organizationId); } @@ -469,37 +469,37 @@ namespace WebsitePanel.Providers.HostedSolution HostedSolutionLog.LogStart("DeleteUserInternal"); HostedSolutionLog.DebugInfo("loginName : {0}", loginName); HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId); - + if (string.IsNullOrEmpty(loginName)) throw new ArgumentNullException("loginName"); if (string.IsNullOrEmpty(organizationId)) throw new ArgumentNullException("organizationId"); - string path = GetUserPath(organizationId, loginName); + string path = GetUserPath(organizationId, loginName); if (ActiveDirectoryUtils.AdObjectExists(path)) - ActiveDirectoryUtils.DeleteADObject(path,true); + ActiveDirectoryUtils.DeleteADObject(path, true); HostedSolutionLog.LogEnd("DeleteUserInternal"); } - + public OrganizationUser GetUserGeneralSettings(string loginName, string organizationId) { return GetUserGeneralSettingsInternal(loginName, organizationId); } - + internal OrganizationUser GetUserGeneralSettingsInternal(string loginName, string organizationId) { HostedSolutionLog.LogStart("GetUserGeneralSettingsInternal"); HostedSolutionLog.DebugInfo("loginName : {0}", loginName); HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId); - + if (string.IsNullOrEmpty(loginName)) throw new ArgumentNullException("loginName"); string path = GetUserPath(organizationId, loginName); DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path); - + OrganizationUser retUser = new OrganizationUser(); retUser.FirstName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.FirstName); @@ -529,25 +529,25 @@ namespace WebsitePanel.Providers.HostedSolution retUser.DomainUserName = GetDomainName(ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName)); retUser.DistinguishedName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.DistinguishedName); retUser.Locked = (bool)entry.InvokeGet(ADAttributes.AccountLocked); - retUser.UserPrincipalName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.UserPrincipalName); - + retUser.UserPrincipalName= (string)entry.InvokeGet(ADAttributes.UserPrincipalName); + HostedSolutionLog.LogEnd("GetUserGeneralSettingsInternal"); return retUser; } - private string GetDomainName(string username) - { - string domain = ActiveDirectoryUtils.GetNETBIOSDomainName(RootDomain); - string ret = string.Format(@"{0}\{1}", domain, username); - return ret; - } + private string GetDomainName(string username) + { + string domain = ActiveDirectoryUtils.GetNETBIOSDomainName(RootDomain); + string ret = string.Format(@"{0}\{1}", domain, username); + return ret; + } private OrganizationUser GetManager(DirectoryEntry entry) { OrganizationUser retUser = null; string path = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.Manager); if (!string.IsNullOrEmpty(path)) - { + { path = ActiveDirectoryUtils.AddADPrefix(path, PrimaryDomainController); if (ActiveDirectoryUtils.AdObjectExists(path)) { @@ -556,18 +556,18 @@ namespace WebsitePanel.Providers.HostedSolution retUser.DisplayName = ActiveDirectoryUtils.GetADObjectStringProperty(user, ADAttributes.DisplayName); retUser.AccountName = ActiveDirectoryUtils.GetADObjectStringProperty(user, ADAttributes.Name); - } + } } - + return retUser; } - - public void SetUserGeneralSettings(string organizationId, string accountName, string displayName, string password, + + public void SetUserGeneralSettings(string organizationId, string accountName, string displayName, string password, bool hideFromAddressBook, bool disabled, bool locked, string firstName, string initials, string lastName, string address, string city, string state, string zip, string country, string jobTitle, string company, string department, string office, string managerAccountName, string businessPhone, string fax, string homePhone, string mobilePhone, string pager, - string webPage, string notes, string externalEmail) + string webPage, string notes, string externalEmail) { SetUserGeneralSettingsInternal(organizationId, accountName, displayName, password, hideFromAddressBook, disabled, locked, firstName, initials, lastName, address, city, state, zip, country, jobTitle, @@ -583,10 +583,10 @@ namespace WebsitePanel.Providers.HostedSolution string webPage, string notes, string externalEmail) { string path = GetUserPath(organizationId, accountName); - DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path); + DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path); - ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.FirstName, firstName); + ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.FirstName, firstName); ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.LastName, lastName); ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.DisplayName, displayName); @@ -609,7 +609,7 @@ namespace WebsitePanel.Providers.HostedSolution ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.Notes, notes); ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.ExternalEmail, externalEmail); ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.CustomAttribute2, (disabled ? "disabled" : null)); - + string manager = string.Empty; if (!string.IsNullOrEmpty(managerAccountName)) @@ -619,7 +619,7 @@ namespace WebsitePanel.Providers.HostedSolution } ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.Manager, ActiveDirectoryUtils.RemoveADPrefix(manager)); - + entry.InvokeSet(ADAttributes.AccountDisabled, disabled); if (!string.IsNullOrEmpty(password)) entry.Invoke(ADAttributes.SetPassword, password); @@ -629,13 +629,44 @@ namespace WebsitePanel.Providers.HostedSolution bool isLoked = (bool)entry.InvokeGet(ADAttributes.AccountLocked); if (isLoked) entry.InvokeSet(ADAttributes.AccountLocked, locked); - + } - - + + entry.CommitChanges(); } + public void SetUserPassword(string organizationId, string accountName, string password) + { + SetUserPasswordInternal(organizationId, accountName, password); + } + + internal void SetUserPasswordInternal(string organizationId, string accountName, string password) + { + string path = GetUserPath(organizationId, accountName); + DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path); + + if (!string.IsNullOrEmpty(password)) + entry.Invoke(ADAttributes.SetPassword, password); + + entry.CommitChanges(); + } + + + public void SetUserPrincipalName(string organizationId, string accountName, string userPrincipalName) + { + SetUserPrincipalNameInternal(organizationId, accountName, userPrincipalName); + } + + internal void SetUserPrincipalNameInternal(string organizationId, string accountName, string userPrincipalName) + { + string path = GetUserPath(organizationId, accountName); + DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path); + + ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.UserPrincipalName, userPrincipalName); + + entry.CommitChanges(); + } public string GetSamAccountNameByUserPrincipalName(string organizationId, string userPrincipalName) { @@ -679,15 +710,15 @@ namespace WebsitePanel.Providers.HostedSolution } - #endregion + #endregion #region Domains - + public void CreateOrganizationDomain(string organizationDistinguishedName, string domain) { CreateOrganizationDomainInternal(organizationDistinguishedName, domain); } - + /// /// Creates organization domain /// @@ -702,7 +733,7 @@ namespace WebsitePanel.Providers.HostedSolution HostedSolutionLog.LogEnd("CreateOrganizationDomainInternal"); } - + public void DeleteOrganizationDomain(string organizationDistinguishedName, string domain) { DeleteOrganizationDomainInternal(organizationDistinguishedName, domain); @@ -730,6 +761,6 @@ namespace WebsitePanel.Providers.HostedSolution return Environment.UserDomainName != Environment.MachineName; } - + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs index c9d6a0f0..f7ecb33e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs @@ -26,10 +26,11 @@ // (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.5456 +// Runtime Version:2.0.50727.6400 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -37,7 +38,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. // namespace WebsitePanel.Providers.HostedSolution { using System.Xml.Serialization; @@ -47,12 +48,13 @@ namespace WebsitePanel.Providers.HostedSolution { using System; using System.Diagnostics; + using WebsitePanel.Providers.Common; using WebsitePanel.Providers.ResultObjects; - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="OrganizationsSoap", Namespace="http://tempuri.org/")] @@ -76,6 +78,10 @@ namespace WebsitePanel.Providers.HostedSolution { private System.Threading.SendOrPostCallback SetUserGeneralSettingsOperationCompleted; + private System.Threading.SendOrPostCallback SetUserPasswordOperationCompleted; + + private System.Threading.SendOrPostCallback SetUserPrincipalNameOperationCompleted; + private System.Threading.SendOrPostCallback DeleteOrganizationDomainOperationCompleted; private System.Threading.SendOrPostCallback CreateOrganizationDomainOperationCompleted; @@ -86,7 +92,7 @@ namespace WebsitePanel.Providers.HostedSolution { /// public Organizations() { - this.Url = "http://localhost:9006/Organizations.asmx"; + this.Url = "http://localhost:9003/Organizations.asmx"; } /// @@ -110,6 +116,12 @@ namespace WebsitePanel.Providers.HostedSolution { /// public event SetUserGeneralSettingsCompletedEventHandler SetUserGeneralSettingsCompleted; + /// + public event SetUserPasswordCompletedEventHandler SetUserPasswordCompleted; + + /// + public event SetUserPrincipalNameCompletedEventHandler SetUserPrincipalNameCompleted; + /// public event DeleteOrganizationDomainCompletedEventHandler DeleteOrganizationDomainCompleted; @@ -627,6 +639,98 @@ namespace WebsitePanel.Providers.HostedSolution { } } + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserPassword", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void SetUserPassword(string organizationId, string accountName, string password) { + this.Invoke("SetUserPassword", new object[] { + organizationId, + accountName, + password}); + } + + /// + public System.IAsyncResult BeginSetUserPassword(string organizationId, string accountName, string password, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SetUserPassword", new object[] { + organizationId, + accountName, + password}, callback, asyncState); + } + + /// + public void EndSetUserPassword(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void SetUserPasswordAsync(string organizationId, string accountName, string password) { + this.SetUserPasswordAsync(organizationId, accountName, password, null); + } + + /// + public void SetUserPasswordAsync(string organizationId, string accountName, string password, object userState) { + if ((this.SetUserPasswordOperationCompleted == null)) { + this.SetUserPasswordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserPasswordOperationCompleted); + } + this.InvokeAsync("SetUserPassword", new object[] { + organizationId, + accountName, + password}, this.SetUserPasswordOperationCompleted, userState); + } + + private void OnSetUserPasswordOperationCompleted(object arg) { + if ((this.SetUserPasswordCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetUserPasswordCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserPrincipalName", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void SetUserPrincipalName(string organizationId, string accountName, string userPrincipalName) { + this.Invoke("SetUserPrincipalName", new object[] { + organizationId, + accountName, + userPrincipalName}); + } + + /// + public System.IAsyncResult BeginSetUserPrincipalName(string organizationId, string accountName, string userPrincipalName, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SetUserPrincipalName", new object[] { + organizationId, + accountName, + userPrincipalName}, callback, asyncState); + } + + /// + public void EndSetUserPrincipalName(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void SetUserPrincipalNameAsync(string organizationId, string accountName, string userPrincipalName) { + this.SetUserPrincipalNameAsync(organizationId, accountName, userPrincipalName, null); + } + + /// + public void SetUserPrincipalNameAsync(string organizationId, string accountName, string userPrincipalName, object userState) { + if ((this.SetUserPrincipalNameOperationCompleted == null)) { + this.SetUserPrincipalNameOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserPrincipalNameOperationCompleted); + } + this.InvokeAsync("SetUserPrincipalName", new object[] { + organizationId, + accountName, + userPrincipalName}, this.SetUserPrincipalNameOperationCompleted, userState); + } + + private void OnSetUserPrincipalNameOperationCompleted(object arg) { + if ((this.SetUserPrincipalNameCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetUserPrincipalNameCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteOrganizationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] @@ -804,11 +908,11 @@ namespace WebsitePanel.Providers.HostedSolution { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void OrganizationExistsCompletedEventHandler(object sender, OrganizationExistsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class OrganizationExistsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -830,11 +934,11 @@ namespace WebsitePanel.Providers.HostedSolution { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CreateOrganizationCompletedEventHandler(object sender, CreateOrganizationCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CreateOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -856,15 +960,15 @@ namespace WebsitePanel.Providers.HostedSolution { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void DeleteOrganizationCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CreateUserCompletedEventHandler(object sender, CreateUserCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CreateUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -886,15 +990,15 @@ namespace WebsitePanel.Providers.HostedSolution { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void DeleteUserCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetUserGeneralSettingsCompletedEventHandler(object sender, GetUserGeneralSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -916,23 +1020,31 @@ namespace WebsitePanel.Providers.HostedSolution { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SetUserGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void SetUserPasswordCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void SetUserPrincipalNameCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void DeleteOrganizationDomainCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CreateOrganizationDomainCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetPasswordPolicyCompletedEventHandler(object sender, GetPasswordPolicyCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetPasswordPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -954,11 +1066,11 @@ namespace WebsitePanel.Providers.HostedSolution { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetSamAccountNameByUserPrincipalNameCompletedEventHandler(object sender, GetSamAccountNameByUserPrincipalNameCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetSamAccountNameByUserPrincipalNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { diff --git a/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs index 775058d8..4b70e354 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs @@ -125,6 +125,20 @@ namespace WebsitePanel.Server } + [WebMethod, SoapHeader("settings")] + public void SetUserPassword(string organizationId, string accountName, string password) + { + Organization.SetUserPassword(organizationId, accountName, password); + } + + + [WebMethod, SoapHeader("settings")] + public void SetUserPrincipalName(string organizationId, string accountName, string userPrincipalName) + { + Organization.SetUserPrincipalName(organizationId, accountName, userPrincipalName); + } + + [WebMethod, SoapHeader("settings")] public void DeleteOrganizationDomain(string organizationDistinguishedName, string domain) { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx index 30363019..e5ac1de2 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -3083,6 +3083,19 @@ User general settings have been successfully updated. + + User password has been successfully updated. + + + Failed to update user password. + + + User login name has been successfully updated. + + + Failed to update user login name. + + Mailbox primary e-mail address has been changed. diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserGeneralSettings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserGeneralSettings.ascx.resx index 6946695e..2867a2c5 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserGeneralSettings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserGeneralSettings.ascx.resx @@ -239,4 +239,13 @@ Login Name: + + Set Password + + + Set Login Name + + + Set login name for services + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxEmailAddresses.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxEmailAddresses.ascx index ce2359a1..6f74c098 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxEmailAddresses.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxEmailAddresses.ascx @@ -73,7 +73,7 @@ - + @@ -87,7 +87,7 @@
  - +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxEmailAddresses.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxEmailAddresses.ascx.designer.cs index 4a04d015..b9a27568 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxEmailAddresses.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxEmailAddresses.ascx.designer.cs @@ -182,14 +182,5 @@ namespace WebsitePanel.Portal.ExchangeServer { /// To modify move field declaration from designer file to code-behind file. ///
protected global::System.Web.UI.WebControls.CheckBox chkPmmAllowed; - - /// - /// FormComments control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Localize FormComments; } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx index cc4d2ce4..b1ad839d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx @@ -4,7 +4,7 @@ <%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> <%@ Register Src="../UserControls/PasswordControl.ascx" TagName="PasswordControl" TagPrefix="wsp" %> -<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %> +<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %> <%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> <%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %> <%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %> @@ -47,7 +47,15 @@ + + + + + + + @@ -62,8 +70,13 @@ - + + + + + @@ -71,9 +84,6 @@ -

@@ -107,7 +117,7 @@ - @@ -146,7 +156,7 @@ - @@ -191,7 +201,7 @@ - @@ -239,7 +249,7 @@ - diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs index 16bb35ec..f74e0aa2 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs @@ -27,6 +27,7 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using System; +using System.Web.UI.WebControls; using WebsitePanel.EnterpriseServer; using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.ResultObjects; @@ -63,8 +64,6 @@ namespace WebsitePanel.Portal.HostedSolution } } - password.EditMode = password.ValidationEnabled = false; - // get settings OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID); @@ -127,19 +126,54 @@ namespace WebsitePanel.Portal.HostedSolution { lblUserPrincipalName.Visible = true; upn.Visible = false; + ddlEmailAddresses.Visible = false; + btnSetUserPrincipalName.Visible = false; + chkInherit.Visible = false; } else { lblUserPrincipalName.Visible = false; - upn.Visible = true; - if (!string.IsNullOrEmpty(user.UserPrincipalName)) + upn.Visible = false; + ddlEmailAddresses.Visible = false; + btnSetUserPrincipalName.Visible = true; + chkInherit.Visible = true; + if (user.AccountType == ExchangeAccountType.Mailbox) { - string[] Tmp = user.UserPrincipalName.Split('@'); - upn.AccountName = Tmp[0]; + ddlEmailAddresses.Visible = true; + WebsitePanel.EnterpriseServer.ExchangeEmailAddress[] emails = ES.Services.ExchangeServer.GetMailboxEmailAddresses(PanelRequest.ItemID, PanelRequest.AccountID); - if (Tmp.Length > 1) + foreach (WebsitePanel.EnterpriseServer.ExchangeEmailAddress mail in emails) { - upn.DomainName = Tmp[1]; + ListItem li = new ListItem(); + li.Text = mail.EmailAddress; + li.Value = mail.EmailAddress; + li.Selected = mail.IsPrimary; + ddlEmailAddresses.Items.Add(li); + } + + foreach (ListItem li in ddlEmailAddresses.Items) + { + if (li.Value == user.UserPrincipalName) + { + ddlEmailAddresses.ClearSelection(); + li.Selected = true; + break; + } + } + + } + else + { + upn.Visible = true; + if (!string.IsNullOrEmpty(user.UserPrincipalName)) + { + string[] Tmp = user.UserPrincipalName.Split('@'); + upn.AccountName = Tmp[0]; + + if (Tmp.Length > 1) + { + upn.DomainName = Tmp[1]; + } } } @@ -153,6 +187,8 @@ namespace WebsitePanel.Portal.HostedSolution chkLocked.Checked = user.Locked; + password.ValidationEnabled = true; + password.Password = string.Empty; } catch (Exception ex) { @@ -165,17 +201,12 @@ namespace WebsitePanel.Portal.HostedSolution if (!Page.IsValid) return; - string pwd = password.Password; - - if (!chkSetPassword.Checked) - pwd = string.Empty; - try { int result = ES.Services.Organizations.SetUserGeneralSettings( PanelRequest.ItemID, PanelRequest.AccountID, txtDisplayName.Text, - pwd, + string.Empty, false, chkDisable.Checked, chkLocked.Checked, @@ -230,10 +261,66 @@ namespace WebsitePanel.Portal.HostedSolution SaveSettings(); } - protected void chkSetPassword_CheckedChanged(object sender, EventArgs e) + protected void btnSetUserPrincipalName_Click(object sender, EventArgs e) { - password.EditMode = password.ValidationEnabled = chkSetPassword.Checked; + string userPrincipalName = string.Empty; + + if (upn.Visible) + userPrincipalName = upn.Email; + else + if (ddlEmailAddresses.Visible) + userPrincipalName = (string)ddlEmailAddresses.SelectedValue; + + if (string.IsNullOrEmpty(userPrincipalName)) return; + + try + { + int result = ES.Services.Organizations.SetUserPrincipalName( + PanelRequest.ItemID, PanelRequest.AccountID, + userPrincipalName.ToLower(), + chkInherit.Checked); + + if (result < 0) + { + messageBox.ShowResultMessage(result); + return; + } + + messageBox.ShowSuccessMessage("ORGANIZATION_SET_USER_PRINCIPALNAME"); + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("ORGANIZATION_SET_USER_PRINCIPALNAME", ex); + } + } + + protected void btnSetUserPassword_Click(object sender, EventArgs e) + { + + if (!Page.IsValid) + return; + + try + { + int result = ES.Services.Organizations.SetUserPassword( + PanelRequest.ItemID, PanelRequest.AccountID, + password.Password); + + if (result < 0) + { + messageBox.ShowResultMessage(result); + return; + } + + messageBox.ShowSuccessMessage("ORGANIZATION_SET_USER_PASSWORD"); + } + catch (Exception ex) + { + messageBox.ShowErrorMessage("ORGANIZATION_SET_USER_PASSWORD", ex); + } + + } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.designer.cs index 9b3fbd4b..b9632720 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.designer.cs @@ -120,6 +120,33 @@ namespace WebsitePanel.Portal.HostedSolution { ///
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.EmailAddress upn; + /// + /// ddlEmailAddresses control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlEmailAddresses; + + /// + /// btnSetUserPrincipalName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSetUserPrincipalName; + + /// + /// chkInherit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkInherit; + /// /// locDisplayName control. /// @@ -166,13 +193,22 @@ namespace WebsitePanel.Portal.HostedSolution { protected global::WebsitePanel.Portal.PasswordControl password; /// - /// chkSetPassword control. + /// btnSetUserPassword control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CheckBox chkSetPassword; + protected global::System.Web.UI.WebControls.Button btnSetUserPassword; + + /// + /// ValidationSummary2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary2; /// /// chkDisable control. diff --git a/WebsitePanel/Sources/generate_es_proxies.bat b/WebsitePanel/Sources/generate_es_proxies.bat index 0f50b419..5a4fbd8d 100644 --- a/WebsitePanel/Sources/generate_es_proxies.bat +++ b/WebsitePanel/Sources/generate_es_proxies.bat @@ -56,8 +56,8 @@ REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\OCSProxy.cs REM %WSDL% %SERVER_URL%/esOperatingSystems.asmx /out:.\WebsitePanel.EnterpriseServer.Client\OperatingSystemsProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\OperatingSystemsProxy.cs -REM %WSDL% %SERVER_URL%/esOrganizations.asmx /out:.\WebsitePanel.EnterpriseServer.Client\OrganizationProxy.cs /namespace:WebsitePanel.EnterpriseServer.HostedSolution /type:webClient -REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\OrganizationProxy.cs +%WSDL% %SERVER_URL%/esOrganizations.asmx /out:.\WebsitePanel.EnterpriseServer.Client\OrganizationProxy.cs /namespace:WebsitePanel.EnterpriseServer.HostedSolution /type:webClient +%WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\OrganizationProxy.cs REM %WSDL% %SERVER_URL%/esPackages.asmx /out:.\WebsitePanel.EnterpriseServer.Client\PackagesProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\PackagesProxy.cs @@ -92,8 +92,8 @@ REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\WebServersProxy.cs REM %WSDL% %SERVER_URL%/esVirtualizationServerForPrivateCloud.asmx /out:.\WebsitePanel.EnterpriseServer.Client\VirtualizationServerProxyForPrivateCloud.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\VirtualizationServerProxyForPrivateCloud.cs -%WSDL% %SERVER_URL%/esLync.asmx /out:.\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient -%WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs +REM %WSDL% %SERVER_URL%/esLync.asmx /out:.\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient +REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs diff --git a/WebsitePanel/Sources/generate_server_proxies.bat b/WebsitePanel/Sources/generate_server_proxies.bat index 8c3cfdee..d4811b50 100644 --- a/WebsitePanel/Sources/generate_server_proxies.bat +++ b/WebsitePanel/Sources/generate_server_proxies.bat @@ -35,8 +35,8 @@ REM %WSE_CLEAN% .\WebsitePanel.Server.Client\OCSServerProxy.cs REM %WSDL% %SERVER_URL%/OperatingSystem.asmx /out:.\WebsitePanel.Server.Client\OperatingSystemProxy.cs /namespace:WebsitePanel.Providers.OS /type:webClient /fields REM %WSE_CLEAN% .\WebsitePanel.Server.Client\OperatingSystemProxy.cs -REM %WSDL% %SERVER_URL%/Organizations.asmx /out:.\WebsitePanel.Server.Client\OrganizationProxy.cs /namespace:WebsitePanel.Providers.HostedSolution /type:webClient /fields -REM %WSE_CLEAN% .\WebsitePanel.Server.Client\OrganizationProxy.cs +%WSDL% %SERVER_URL%/Organizations.asmx /out:.\WebsitePanel.Server.Client\OrganizationProxy.cs /namespace:WebsitePanel.Providers.HostedSolution /type:webClient /fields +%WSE_CLEAN% .\WebsitePanel.Server.Client\OrganizationProxy.cs REM %WSDL% %SERVER_URL%/ServiceProvider.asmx /out:.\WebsitePanel.Server.Client\ServiceProviderProxy.cs /namespace:WebsitePanel.Providers /type:webClient /fields REM %WSE_CLEAN% .\WebsitePanel.Server.Client\ServiceProviderProxy.cs @@ -56,7 +56,7 @@ REM %WSE_CLEAN% .\WebsitePanel.Server.Client\WebServerProxy.cs REM %WSDL% %SERVER_URL%/WindowsServer.asmx /out:.\WebsitePanel.Server.Client\WindowsServerProxy.cs /namespace:WebsitePanel.Server /type:webClient /fields REM %WSE_CLEAN% .\WebsitePanel.Server.Client\WindowsServerProxy.cs -%WSDL% %SERVER_URL%/LyncServer.asmx /out:.\WebsitePanel.Server.Client\LyncServerProxy.cs /namespace:WebsitePanel.Providers.Lync /type:webClient /fields -%WSE_CLEAN% .\WebsitePanel.Server.Client\LyncServerProxy.cs +REM %WSDL% %SERVER_URL%/LyncServer.asmx /out:.\WebsitePanel.Server.Client\LyncServerProxy.cs /namespace:WebsitePanel.Providers.Lync /type:webClient /fields +REM %WSE_CLEAN% .\WebsitePanel.Server.Client\LyncServerProxy.cs