-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
.NET 10 added a new check when setting Socket.DualMode = true that throws a PlatformNotSupportedException if the underlying OS doesn't support IPv6.
This causes Kestrel to throw when specifying listen URLs such as https://*:443. This is a regression from .NET 9.
Expected Behavior
No exception
Steps To Reproduce
No response
Exceptions (if any)
fail: Microsoft.Extensions.Hosting.Internal.Host[11]
Hosting failed to start
System.PlatformNotSupportedException: Operation is not supported on this platform.
at System.Net.Sockets.Socket.set_DualMode(Boolean value)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
.NET Version
10.0.0
Anything else?
No response