UserManagementServiceloginExt Method |
Namespace: (Default Namespace)
A ResultLogin object which contains these members.
A successful login (non-error) will contain an Authorization Key in ResultLogin.AuthKey.
Authentication keys are only valid for a limited time. See the renewToken method for more information.
For a list of possible errors and warnings, see ResultLogin.ErrorType.
UserManagementServiceSoapClient ums = new UserManagementServiceSoapClient(); ResultLogin result = ums.loginExt(userName, password); if (result.Status == ResultStatusOKErrorWarning.StatusError) { // Unable to log in return; } else if (result.Status == ResultStatusOKErrorWarning.StatusWarning) { string message = "Login Warning:" + "\r\n"; if (result.ErrorType != null) foreach (ResultLoginErrors error in result.ErrorType) message = message + "\r\n" + error.ToString(); if (result.Message != String.Empty) message = message + "\r\n" + result.Message; // Log in OK, but there was a warning. // message contains the list of warnings } // OK, store authorization key and continue. string authKey = result.AuthKey;