Today I was debugging an old web API project and suddenly an error appeared:
SocketException: An attempt was made to access a socket in a way forbidden by its access permissions.
I tried restarting Visual Studio but the error remains…considering that I didn’t change anything from the previous debugging session I decided to ask the web and after a little while searching I discovered a simple solution.
In my case what I needed was to start a PowerShell session with administrative privileges and run the following commands:
net stop hns
net start hns
Et voila! I got my debugging session up and running!
Hope that helps!
Top comments (0)