I used netstat -aon | findstr 28080
to check if the port is in use, and it returned nothing
The command prompt
But when I want to use this port in Asp.net, the error shows like following,
the error shown in Visual Studio. Is there anyone encounter this before? I just want to know how can I grant my application access to this port.
I also tried 38080,48080,28081, none can work.
I am using the signalR to connect with the frontend, and the code where the exception occur is as following:
string url = "HTTP://*:28080";
using (WebApp.Start<Startup>(url))// Exception occurs here
{
Logger.Info($"SelfHosted Server running on {url}");
Dosomething();
}