예제 #1
0
        public static string GetErrorDescription(EnterpriseAuthenticationErrorCode errorCode)
        {
            switch (errorCode)
            {
            case EnterpriseAuthenticationErrorCode.USER_NOT_FOUND:
                return("User not found");

            case EnterpriseAuthenticationErrorCode.INVALID_LOGIN_CREDENTIALS:
                return("Invalid credentials");

            case EnterpriseAuthenticationErrorCode.LOGIN_NOT_PERMITTED_AT_THIS_TIME:
                return("Not permitted to login at this time");

            case EnterpriseAuthenticationErrorCode.LOGIN_NOT_PERMITTED_AT_THIS_WORKSTATION:
                return("Not permitted to login at this workstation");

            case EnterpriseAuthenticationErrorCode.PASSWORD_EXPIRED:
                return("Password expired");

            case EnterpriseAuthenticationErrorCode.ACCOUNT_DISABLED:
                return("Account disabled");

            case EnterpriseAuthenticationErrorCode.USER_NOT_GRANTED_LOGIN_AT_THIS_MACHINE:
                return("The user has not been granted the requested logon type at this machine");

            case EnterpriseAuthenticationErrorCode.ACCOUNT_EXPIRED:
                return("Account expired");

            case EnterpriseAuthenticationErrorCode.USER_MUST_RESET_PASSWORD:
                return("User must reset password but it cannot be done remotely");

            case EnterpriseAuthenticationErrorCode.USER_ACCOUNT_LOCKED:
                return("User account locked");

            case EnterpriseAuthenticationErrorCode.UNKNOWN_ERROR:
            default:
                return("Unknown error occured");
            }
        }
예제 #2
0
 public DirectoryExceptionHelper(EnterpriseAuthenticationErrorCode e)
 {
     ErrorCode = e;
 }