Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
In our case the port we want to listen to was used by other app, which only use the port in ipv4 for connect remote server.
Result in kestrel fail to bind ipv4 silently (only logs output, no exception throw), and user can't connect to our app service while app report everything is normal.
Describe the solution you'd like
Add a option for ListenLocalhost extension method and LocalhostListenOptions to froce LocalhostListenOptions throw exception when bind to v4 or v6 fail, instead of fail sliently.
Maybe a enum like:
- AlwaysThrowOnBindFail
- ThrowOnBindV4Fail (pure v6 environment)
- ThrowOnBindV6Fail (in case of ipv6 isn't available or disable in user environment)
Additional context
No response