Reed
Reed

Reputation: 1642

IIS Express Remote access with Visual Studio 2019

I don't remeber this being an issue before, and many threads are rather outdated now.

On my Windows 10 installation VS 2019 hosts my project at http://localhost:58402 just fine.

However when I go to change the url under Properties > Debug > App URL to 0.0.0.0:58402 I get the error:

Cannot connect to web server IIS Express

What I have tried:

  1. Running VS 2019 as admin
  2. Restarting computer
  3. Deleting hidden VS folder
  4. Modifying launchSettings.json in my API project properties folder

I can change the port just fine. But as soon as I change localhost to 0.0.0.0 the error occurs.

Upvotes: 7

Views: 9317

Answers (1)

Reed
Reed

Reputation: 1642

Update:

I have been using the NPM package iisexpress-proxy with great success now as a daily driver for 5 months now.

Had some difficulty with CORS, but disabling that for local debugging allows me to do everything I would expect.

https://www.npmjs.com/package/iisexpress-proxy

Upvotes: 2

Related Questions