System.Net.Security.NegoState.ThrowCredentialException C# (CSharp) Method

ThrowCredentialException() static private method

static private ThrowCredentialException ( long error ) : void
error long
return void
        internal static void ThrowCredentialException(long error)
        {
            Win32Exception e = new Win32Exception((int)error);

            if (e.NativeErrorCode == (int)SecurityStatusPalErrorCode.LogonDenied)
            {
                throw new InvalidCredentialException(SR.net_auth_bad_client_creds, e);
            }

            if (e.NativeErrorCode == NegoState.ERROR_TRUST_FAILURE)
            {
                throw new AuthenticationException(SR.net_auth_context_expectation_remote, e);
            }

            throw new AuthenticationException(SR.net_auth_alert, e);
        }