You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
works fine on Windows but fails on linux-x64 (WSL, Ubuntu)
exception: System.Net.HttpListenerException (400): Invalid port in prefix.
at System.Net.HttpEndPointManager.AddPrefixInternal(String p, HttpListener listener)
at System.Net.HttpEndPointManager.AddListener(HttpListener listener)
at System.Net.HttpListener.Start()
Additionally the behavior in regards of IPv4 IPv6 on Windows and Linux is different. With the prefix: http://localhost:54321/meow/
HttpListener binds both to IPv4 and IPv6 on Windows. But not on Linux.
The text was updated successfully, but these errors were encountered:
works fine on Windows but fails on linux-x64 (WSL, Ubuntu)
FYI, the implementation of HttpListener on Linux is substantially different than Windows. Windows uses the original .NET Framework (ported to .NET Core) implemented layered on top of http.sys. Linux uses a separate implementation originally from Mono.
Similar issue here, works fine in Windows 11 (.net 6.0.401) but fails in Raspberry Pi OS (linux-arm 6.0.401) System.Net.HttpListenerException (400): Invalid path.
dotnet --version
3.1.201
_httpListener.Prefixes.Add("http://[::1]:54321/meow/");
works fine on Windows but fails on linux-x64 (WSL, Ubuntu)
exception: System.Net.HttpListenerException (400): Invalid port in prefix.
at System.Net.HttpEndPointManager.AddPrefixInternal(String p, HttpListener listener)
at System.Net.HttpEndPointManager.AddListener(HttpListener listener)
at System.Net.HttpListener.Start()
Additionally the behavior in regards of IPv4 IPv6 on Windows and Linux is different. With the prefix:
http://localhost:54321/meow/
HttpListener binds both to IPv4 and IPv6 on Windows. But not on Linux.
The text was updated successfully, but these errors were encountered: