Sửa lỗi unable to launch the iis express web server năm 2024

Working with Visual Studio on recent Windows versions such as Windows 10 can be tricky, as the improved security settings of the new OS might create some issues on a developer machine, which often need to have access to some system files - expecially when working with IIS Express. We talked about that in a number of post, for example here (error accessing IIS Metabase), here (allow external requests from remote machines) and also here (Process with an ID #### error).

Here we'll introduce another issue you might stumble upon while working with an ASP.NET Core or MVC solution, right after you try to execute it in debug mode:

Unable to launch the IIS Express Web server

There are many workaround that might fix this issue: we suggest to try them one after another, stopping only when you manage to fix it.

  1. Delete the \Documents\IISExpress folder using the following console command:rmdir /s /q "%userprofile%\Documents\IISExpress"
  2. Delete the applicationhost.config file which is placed within the \.vs\Config\ folder in your Visual Studio project root folder.
  3. Close Visual Studio and re-start it with Administrative priviledges (right-click > Run as Administrator).
  4. Change the project's website random URL: within Visual Studio, right-click to the project node in Solution Explorer, then select Properties; navigate through the Web panel, then change the number in the Project Url textbox value.
  5. Add the _CSRUN_DISABLE_WORKAROUNDS Environment System variable with the value of 1 as shown in the following screenshot (thanks to Juan M. Elosegui for reporting this on this SO thread and for the image):

Sửa lỗi unable to launch the iis express web server năm 2024

In case you manage to fix the issue, let us know which of the given workarounds worked for you by leaving a feedback in this post's comment section.

That's it for now: happy coding!

Post navigation

IT Project Manager, Web Interface Architect and Lead Developer for many high-traffic web sites & services hosted in Italy and Europe. Since 2010 it's also a lead designer for many App and games for Android, iOS and Windows Phone mobile devices for a number of italian companies. Microsoft MVP for Development Technologies since 2018.

In my team we have 5 to 10 members. Since we wanted to do a build for our current application, I used "Get the Latest files from the server". (We are using TFS.) Then when I run my application I was getting this error.

The cause of this error is, someone has checked in the solution file with his port number (the port number he was using). When I took the latest, it was set in my solution file also. We must take the latest solution file only when it is required. So here I will share the remedy for the preceding issue.

I copied a Visual Studio 2022 ASP.NET MVC project that I was working on from my desktop machine to my laptop. When I attempted to test/run the app in debug mode from within Visual Studio 2022, I got an "Unable to launch the IIS Express Web server" error with the following details:

Output from IIS: Failed to to register URL "http://192.168.0.104:24995/" for site "MyWebApp" application "/". Error description: Access is denied. (0x80070005)

The IP address shown (192.168.0.104), is that of my desktop system, not of my laptop. Yet, when I did a text search for that IP address, I was unable to find it anywhere in any of the project files.

Can someone please either point me to where that IP address would be store, or provide instructions on how to clear out that value?