Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 513
Reed Avatar asked Jul 24 '19 15:07

Reed


People also ask

Can IIS Express be accessed remotely?

IIS Express Run From a Remote Machineconfig by going to IISExpress\config in your documents folder. Right click the devenv.exe icon and choose properties. Then select the compatibility tab. You can also choose to change this setting for all users if you wish.

How do I enable IIS Express in Visual Studio?

Configure IIS express on visual studioSelect the web application project and open properties -> select the web tab -> under server's select IIS express-> Specify the project URL.


1 Answers

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

like image 115
Reed Avatar answered Oct 19 '22 02:10

Reed