Allowing external access to Visual Studio ASP.NET Web API project

While developing a Slack Slash Command for one of the products I work on, I discovered it is rather difficult to allow external access to a Web API in my Visual Studio debugging environment. Using numerous online resources, this is the steps it took to make it all work:

  1. Setup a static IP for the router (or dynamic dns using something like
    1. If not using dynamic DNS, create host record for the static IP (
  2. Allow traffic through the windows firewall for the designated port
  3. Modified applicationhost.config (“.vs” sub-directory in the visual studio solution)
    1. Added bindings for the additional host names
  4. Execute a command to allow external access to the port
    netsh http add urlacl url=http://<IP>:<PORT>/ user=everyone
  5. Modified Web.config to not automatically re-direct to HTTPS (if the project is configured to force HTTPS, like mine was)

It would have been a lot easier, if Slack didn’t require using a URL with a host address, rather than a URL with a static IP.

Leave a Reply

Your email address will not be published. Required fields are marked *