While running my Kestrel application from Visual Studio 2017 (Windows 10), I'm getting this line in my command prompt:
"Unable to bind to http://localhost:50067 on the IPv4 loopback interface: 'An attempt was made to access a socket in a way forbidden by its access permissions'."
And after that it is mentioning that
Microsoft.AspNetCore.Server.Kestrel[0]
Unable to start Kestrel.
For your reference, please look at the screenshot as well
What is the reason behind it?
What I did is, check the port from the command netstat -a
.
Note - netstat -a
in the “Command Prompt” window, and press “Enter.” The computer displays a list of all open TCP and UDP ports
I’m unable to find my port number in that lists as well.
netstat -o
to see where this socket is being held, and I found out that there are lots of port it is showing. But the above port number is not showing.