Dev tunnels
Dev tunnels are a feature of VS that allow you to create an ad-hoc connection to your local ASP.NET Core projects so that other devices can connect to it. For example, suppose that you create a REST service that you want to test on a mobile device, which is probably connected to a different network than localhost. Then, through a dev tunnel, you can create a communication tunnel between the REST API and the device.
Another use case is if you would like to make an online presentation of a project, and you would like the attendees to be able to observe the application being executed. These are just a few use cases that you could use dev tunnels for. Let’s see how to create and use them.
Creating a dev tunnel
To follow this demonstration, you can create a new project with the ASP.NET Core Web App
template or use the project named Chapter6_Code
, which you can download from the link indicated in the Technical requirements section.
Once the project is open...