How to Access and Debug an ASP.NET Core Application Running in Kestrel from Another Computer on the Local Network
If you are developing using .NET Core or later versions and you want to access the application you are developing running on https://localhost:5001
from another computer on the Local Area Network (LAN), you can follow the instructions below:
Adjust your launchSettings.json
file:
launchSettings.json
file, which can be found under the Properties
folder in your project structure.applicationUrl
setting to listen for traffic from all IP addresses/Network interfaces. Modify it as follows: "applicationUrl": "https://0.0.0.0:5001"
Open port 5001 in the Firewall:
Start the application:
Access the application from another computer on the same network:
172.35.0.34
, you would enter https://172.35.0.34:5001
.By following these steps, you can access and debug your ASP.NET Core application from another computer on the local network, allowing for easier testing and debugging scenarios.