Connect device on LAN to ASP.NET Core Web API

I’m running VS2019 community, and I’ve created the default ASP.NET Core Web API project (ASP.NET Core 5.0), the one with the simple weather forecast example. And I am now trying to connect another computer to the URL. I run the example by using the [application name] in the run dropdown, and not IIS Express.

Both computers are connected via wifi to the same Router.
I do an ipconfig on the server machine to get it’s IP (
And I have also enabled inbound connections from the ports 5000-5001 in the windows firewall setup

On the “client” machine I try to access the server with :


but neither seem to work? The page ends up timing out.

So on the machine running the server, I also completely disabled the windows firewalls (temporally, just to get things working).

But still get the same result?

Have I missed a step?


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Maybe this will help you. Try to add IP of your host into Program.cs
var host = new WebHostBuilder().UseUrls("")

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x