Unable to launch the IIS Express Web server error on Visual Studio 2015 - How to fix it

Visual Studio 2013 e 2015: Unable to start debugging on the web server. Could not start ASP.NET debugging - Come risolvere

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):

Unable to launch the IIS Express Web server error on Visual Studio 2015 - How to fix it

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!

About Ryan

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.

View all posts by Ryan

16 Comments on “Unable to launch the IIS Express Web server error on Visual Studio 2015 - How to fix it”

  1. Thank you so much, All the other threads I found didn’t help. I completed steps 1-4 before trying again. Not sure which one did the trick but I’m up and running.

  2. Worked for me!! 1, 2 &3 but everytime I have to debug always show that error, can you explain how to fix it once at for all?

    1. 4 or 5 should grant a more permanent fix (#3 could still be mandatory under some cirumstances, depending on how permissions are configured within the OS and the project type)

  3. I did all of the above… and nothing worked.
    I tried this also https://stackoverflow.com/questions/42963413/visual-studio-2017-debug-unable-to-start-program-invalid-pointer
    Did not work
    I then right clicked my .net core web api project and selected properties…
    Went to the Debug tab…
    Toggeled Hosting mode to in process, clicked on save and built (errored out as expected)
    Then toggled it back to out pf process and clicked save
    Then switch from debug IIS to IIS Express and ran it…
    I got the error Unable to attach to application … dontnet.exe … invalid pointer
    Do you want to continue anyway? Answered Yes.. and it worked..
    But that error comes up each time, but if I answer yes.. it continues..
    Very frustrating..

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.