Using dev tunnels to expose your localhost

Tags: , , Published On: June 27, 2023

Dev tunnels allow developers to expose their local web server to the internet, allowing them to share their work with others or test it on different devices. This can be accomplished by using a service like ngrok, which creates a secure tunnel from a public URL to the local development environment. This allows for easy collaboration and testing of web applications, without the need to deploy to a remote server.

Recently Microsoft introduced this as a new preview feature in Visual Studio 2022 version 17.4 for .NET Core projects. This allows developers to test their application on a variety of devices and platforms, such as mobile devices and other computers, without having to deploy the application to a remote server. The feature uses a local tunneling software to forward the incoming requests to the local development environment.

See Public preview of dev tunnels in Visual Studio for ASP.NET Core projects for more information on how to set this up.

Share this blogpost