1 type derived from AuthenticationException
System.Net.Security (1)
System\Security\Authentication\AuthenticationException.cs (1)
40public class InvalidCredentialException : AuthenticationException
29 instantiations of AuthenticationException
Kestrel.SampleApp (1)
Startup.cs (1)
136throw new AuthenticationException($"The endpoint is not configured for server name '{clientHelloInfo.ServerName}'.");
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\SniOptionsSelector.cs (2)
140throw new AuthenticationException(CoreStrings.FormatSniNotConfiguredToAllowNoServerName(_endpointName)); 144throw new AuthenticationException(CoreStrings.FormatSniNotConfiguredForServerName(serverName, _endpointName));
System.Net.Quic (6)
System\Net\Quic\Internal\ThrowHelper.cs (4)
96return new AuthenticationException(SR.Format(SR.net_quic_auth, GetErrorMessageForStatus(status, message))); 102if (status == QUIC_STATUS_ALPN_NEG_FAILURE) return new AuthenticationException(SR.net_quic_alpn_neg_error); 103if (status == QUIC_STATUS_USER_CANCELED) return new AuthenticationException(SR.Format(SR.net_auth_tls_alert, TlsAlertMessage.UserCanceled)); 123return new AuthenticationException(SR.Format(SR.net_auth_tls_alert, alert));
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (2)
233throw new AuthenticationException(SR.net_quic_cert_custom_validation); 243throw new AuthenticationException(SR.Format(SR.net_quic_cert_chain_validation, sslPolicyErrors));
System.Net.Security (20)
System\Net\Security\NegotiateStream.cs (11)
769new AuthenticationException(SR.net_auth_bad_client_creds_or_target_mismatch), 771new AuthenticationException(SR.net_auth_bad_client_creds_or_target_mismatch), 773new AuthenticationException(SR.Format(SR.net_auth_context_expectation, _expectedImpersonationLevel.ToString(), PrivateImpersonationLevel.ToString())), 775new AuthenticationException(SR.Format(SR.net_auth_context_expectation, _context.ProtectionLevel.ToString(), _expectedProtectionLevel.ToString())), 835_ => new AuthenticationException(SR.net_auth_SSPI, win32Exception) 868throw new AuthenticationException(SR.net_auth_eof); 881throw new AuthenticationException(SR.net_auth_alert); 899throw new AuthenticationException(SR.Format(SR.net_io_header_id, nameof(FrameHeader.MessageId), _framer.ReadHeader.MessageId, FrameHeader.HandshakeId)); 907throw new AuthenticationException(SR.Format(SR.net_io_header_id, nameof(FrameHeader.MessageId), _framer.ReadHeader.MessageId, FrameHeader.HandshakeDoneId)); 938ERROR_TRUST_FAILURE => new AuthenticationException(SR.net_auth_context_expectation_remote, e), 939_ => new AuthenticationException(SR.net_auth_alert, e)
System\Net\Security\SslAuthenticationOptions.cs (1)
135throw new AuthenticationException(SR.net_ssl_io_no_server_cert);
System\Net\Security\SslStream.IO.cs (7)
317throw new AuthenticationException(SR.net_auth_SSPI, token.GetException()); 367throw new AuthenticationException(SR.Format(SR.net_auth_tls_alert, _lastFrame.AlertDescription.ToString()), token.GetException()); 370throw new AuthenticationException(SR.net_auth_SSPI, token.GetException()); 597SendAuthResetSignal(new ReadOnlySpan<byte>(alertToken.Payload), ExceptionDispatchInfo.Capture(new AuthenticationException(SR.net_ssl_io_cert_custom_validation, null))); 602SendAuthResetSignal(new ReadOnlySpan<byte>(alertToken.Payload), ExceptionDispatchInfo.Capture(new AuthenticationException(SR.Format(SR.net_ssl_io_cert_chain_validation, chainStatus), null))); 607SendAuthResetSignal(new ReadOnlySpan<byte>(alertToken.Payload), ExceptionDispatchInfo.Capture(new AuthenticationException(SR.Format(SR.net_ssl_io_cert_validation, sslPolicyErrors), null))); 1027throw new AuthenticationException(SR.net_frame_read_size);
System\Net\Security\SslStream.Protocol.cs (1)
690throw new AuthenticationException(SR.net_ssl_io_no_server_cert);
22 references to AuthenticationException
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (2)
358catch (AuthenticationException exception) 608catch (AuthenticationException exception)
InMemory.FunctionalTests (1)
KestrelMetricsTests.cs (1)
912Assert.Equal(typeof(AuthenticationException).FullName, (string)m.Tags["error.type"]);
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Middleware\HttpsConnectionMiddleware.cs (1)
191catch (AuthenticationException ex)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (4)
SniOptionsSelectorTests.cs (4)
345var authExWithServerName = Assert.Throws<AuthenticationException>(() => sniOptionsSelector.GetOptions(new MockConnectionContext(), "example.org")); 348var authExWithoutServerName = Assert.Throws<AuthenticationException>(() => sniOptionsSelector.GetOptions(new MockConnectionContext(), null));
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (5)
QuicConnectionListenerTests.cs (5)
86var ex = await Assert.ThrowsAsync<AuthenticationException>(async () => 184await Assert.ThrowsAsync<AuthenticationException>(() => QuicConnection.ConnectAsync(options).AsTask()); 257var ex = await Assert.ThrowsAsync<AuthenticationException>(() => QuicConnection.ConnectAsync(options).AsTask()).DefaultTimeout(); 404await Assert.ThrowsAsync<AuthenticationException>(() => clientConnectionTask.AsTask()).DefaultTimeout();
netstandard (1)
netstandard.cs (1)
1822[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Authentication.AuthenticationException))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
837[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Authentication.AuthenticationException))]
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\ConnectHelper.cs (1)
147if (exception is AuthenticationException)
System.Net.Mail (2)
System\Net\Mail\SmtpClient.cs (2)
525e is AuthenticationException || 673e is AuthenticationException ||
System.Net.Quic (1)
System\Net\Quic\QuicListener.cs (1)
172/// Also propagates exceptions from failed connection handshake, e.g. <see cref="AuthenticationException"/>, <see cref="QuicException"/>.
System.Net.Requests (1)
System\Net\FtpWebRequest.cs (1)
1109else if (exception is AuthenticationException || exception is SecurityException)
System.ServiceModel.NetFramingBase (2)
System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (1)
377catch (AuthenticationException exception)
System\ServiceModel\Channels\WindowsStreamSecurityUpgradeProvider.cs (1)
184catch (AuthenticationException exception)