public static DataAccessResponseType UpdateAccountSettings_Internal(string accountNameKey, AccountSettingsDocumentModel accountSettingsDocumentModel) { var response = new AccountManagementService.DataAccessResponseType(); var accountManagementServiceClient = new AccountManagementService.AccountManagementServiceClient(); try { accountManagementServiceClient.Open(); response = accountManagementServiceClient.UpdateAccountSettings(accountNameKey, accountSettingsDocumentModel, AuthenticationCookieManager.GetAuthenticationCookie().Id, AccountAdminSite.AccountManagementService.RequesterType.AccountUser, Common.SharedClientKey); //Close the connection WCFManager.CloseConnection(accountManagementServiceClient); } catch (Exception e) { #region Manage Exception string exceptionMessage = e.Message.ToString(); var currentMethod = System.Reflection.MethodBase.GetCurrentMethod(); string currentMethodString = currentMethod.DeclaringType.FullName + "." + currentMethod.Name; // Abort the connection & manage the exception WCFManager.CloseConnection(accountManagementServiceClient, exceptionMessage, currentMethodString); // Upate the response object response.isSuccess = false; response.ErrorMessage = WCFManager.UserFriendlyExceptionMessage; //response.ErrorMessages[0] = exceptionMessage; #endregion } return(response); }