InvalidCredentialException Class
The exception that is thrown when authentication fails for an authentication stream and cannot be retried.
Assembly: System (in System.dll)
The NegotiateStream and 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 NegotiateStream or SslStream instance. If you can retry the authentication, an AuthenticationException is thrown instead of the InvalidCredentialException.
System.Exception
System.SystemException
System.Security.Authentication.AuthenticationException
System.Security.Authentication.InvalidCredentialException
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.