System.ServiceModel.AddressAccessDeniedException: HTTP could not register URL http::8080 System.ServiceModel.AddressAccessDeniedException: HTTP could not register URL http::8080 asp.net asp.net

System.ServiceModel.AddressAccessDeniedException: HTTP could not register URL http::8080


Start the cmd as Administrator and enter:

netsh http add urlacl url=http://+:8080/MyUri user=DOMAIN\user

this worked for me.


I ran into the same problem on a different project.

The problem is that binding to a tcp port requires administrative privileges. There's a couple ways to deal with this.

  1. Keep an administrative command prompt open. Then you can just run the console app directly.

  2. (As you suggested) run VS as admin. This is absolutely necessary only when debugging your app.

  3. Create an application manifiest file, specifying requestedExecutionLevel level="requireAdministrator". See How do I force my .NET application to run as administrator? for more details.


Root path URL (http://+:8080/) permissions are needed in your case:

netsh http add urlacl url=http://+:8080/ user=%USERDOMAIN%\%USERNAME%

show all URL reservations:

netsh http show urlacl | FIND "URL"