Debugging ASP.net Framework outside of Localhost or from a WAN connection

In .NET core, Microsoft recently released DevTunnels which creates an outgoing connection to a centralized service which receives request from an external provided URL when subscribing to the service, sadly there is no equivalent solution for .NET Framework. As a quick fix I threw together a proxy that resolves this issue exposing the self-hosted debug session externally to any address you prefer. Assuming you code in user (non-admin) mode which is recommended, you may have to add the ACL to netsh to allow hosting at a particular IP/HOSTNAME.

The result of this post is that port 8080 will be forwarded to port 4858. Set port 4858 to the default port used by your IIS Debug session within visual studio.

Leave a comment

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