Description
I have spent the past few months trying to .NET's Quic working, and so far I have gotten it to work on localhost but nothing else.
When I attempt to connect to a Quic socket that isn't on the local machine, I get this exception every time:
System.Security.Authentication.AuthenticationException: Application layer protocol negotiation error was encountered.
at System.Net.Quic.QuicConnection.HandleEventShutdownInitiatedByTransport
Reproduction Steps
Quic server:
var cert = new X509Certificate2("Certs/LocalCert.pfx", "password");
var serverOptions = new QuicServerConnectionOptions
{
DefaultStreamErrorCode = 0x0A,
DefaultCloseErrorCode = 0x0B,
ServerAuthenticationOptions = new SslServerAuthenticationOptions
{
ServerCertificate = cert,
ApplicationProtocols = new List<SslApplicationProtocol>
{ new("AuroraTest") }
},
};
_listener = await QuicListener.ListenAsync(new QuicListenerOptions
{
ListenEndPoint = new IPEndPoint(IPAddress.Loopback, ipEndpoint.Port),
ApplicationProtocols = new List<SslApplicationProtocol>
{ new("AuroraTest") },
ConnectionOptionsCallback = (_, _, _) => ValueTask.FromResult(serverOptions),
}, CancelToken!.Token).ConfigureAwait(false);
Quic client:
var clientOptions = new QuicClientConnectionOptions
{
RemoteEndPoint = ipEndpoint,
DefaultStreamErrorCode = 0x0A,
DefaultCloseErrorCode = 0x0B,
MaxInboundBidirectionalStreams = 10,
MaxInboundUnidirectionalStreams = 10,
ClientAuthenticationOptions = new SslClientAuthenticationOptions
{
ApplicationProtocols = new List<SslApplicationProtocol>
{ new("AuroraTest") }
}
};
Expected behavior
The client connects to the server.
Actual behavior
The client throws a 'Application layer protocol negotiation error was encountered' message.
Regression?
No response
Known Workarounds
No response
Configuration
.NET 7.0.2
Windows 11 22621.1413 x64
Other information
The PFX certificate was self-created and is installed in the Local Machine's Trusted Root store on all devices.
Description
I have spent the past few months trying to .NET's Quic working, and so far I have gotten it to work on localhost but nothing else.
When I attempt to connect to a Quic socket that isn't on the local machine, I get this exception every time:
Reproduction Steps
Quic server:
Quic client:
Expected behavior
The client connects to the server.
Actual behavior
The client throws a 'Application layer protocol negotiation error was encountered' message.
Regression?
No response
Known Workarounds
No response
Configuration
.NET 7.0.2
Windows 11 22621.1413 x64
Other information
The PFX certificate was self-created and is installed in the Local Machine's Trusted Root store on all devices.