System.Security.Authentication.InvalidCredentialException Class

The exception that is thrown when authentication fails for an authentication stream and cannot be retried.

See Also: InvalidCredentialException Members


public class InvalidCredentialException : AuthenticationException


The System.Net.Security.NegotiateStream and System.Net.Security.SslStream classes throw this exception when authentication fails. This exception indicates that the underlying stream is not in a valid state and you cannot retry the authentication using the System.Net.Security.NegotiateStream or System.Net.Security.SslStream instance. If you can retry the authentication, an System.Security.Authentication.AuthenticationException is thrown instead of the System.Security.Authentication.InvalidCredentialException.


Namespace: System.Security.Authentication
Assembly: System (in System.dll)
Assembly Versions:,
Since: .NET 2.0