I am migrating an application from .NET 4 to .NET Core and cannot find an analogue for the HttpListener class
Error CS0246 The type or namespace name 'HttpListener' could not be found (are you missing a using directive or an assembly reference?)
Update1
private readonly HttpListener _httpListener;
if (!HttpListener.IsSupported)
{
throw new NotSupportedException(
"The Http Server cannot run on this operating system.");
}
_httpListener = new HttpListener();
_httpListener.Prefixes.Add(prefix);
_sessionSettings = settings;
source
share