1

How do I change default path of Visual Studio 19 for IIS Express?

I'm getting error :

"An error occurred launching IIS Express. Unable to launch configured Visual Studio Development Web Server. Unable to start program 'C:\Program Files\IIS Express\iisexpress.exe' The system cannot find the file specified.'

That is because it's not correct path. I need to change it to 'C:\Users\user\Documents\IISExpress' or 'C:\Program Files (x86)\IIS Express' if I'm correct.

How do I change that path? Did someone experienced the same problem?

Dalorzo
  • 19,834
  • 7
  • 55
  • 102
private7
  • 347
  • 1
  • 2
  • 15

1 Answers1

2

As far as I know, the installation directory is default which we cannot modify. It will automatically install at “C:\Program Files\IIS Express\” & “ C:\Program Files(x86)\IIS Express”. And “C:\Users\user\Documents\IISExpres” is use to save configure file and log file.

Did this error happen when you debugging web project? If so, hope these suggestions could help you troubleshoot it:

• Download IIS Express.msi, then run it to repair IIS express on your machine

• Clear IIS Express folder in “C:\Users\user\Documents”, then restart visual studio

• Run visual studio as administrator

• Open C:\Users\user\Documents\IISExpres\config\applicationhost.config, then comment out “HttpLoggingModule” line

<add name="HttpLoggingModule" image="%IIS_BIN%\loghttp.dll" />
<add name="HttpLoggingModule" lockItem="true" />

In addition, you could try other solutions here: Unable to launch the IIS Express Web server

Brando Zhang
  • 22,586
  • 6
  • 37
  • 65