There are several questions here why IISExpress does not launch. The answers I found did not help. But I found the answer myself. This post may help others resolve the issue.
Behavior: You open a web project you copied from somebody else in Visual Studio 2015. You cannot select Browsers and when you start using F5 you get a message that says
Unable to launch the IIS Express Web server.
There is no indication why. Deleting applicationHost.config does not help, restarting / reinstalling etc. does not help either. Admin mode doesn't matter and a new project an the target machine works as expected.
1) In Solution Explorer, right click the your project and click Properties. 2) In the left tab, click Web. 3) Select IIS Express, check out your Project Url, then create Virtual Directory.
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. Now open the project folder and . vs folder (Hidden) -> Config -> applicationhost.
Resolution: First I found that opening the very same project in VS 2012 works, it starts IISExpress just fine. So what's different? It's the .vs folder in the projects root and here especially the file .suo where all the user settings specific for Visual Studio 2015 reside.
Delete the folder .vs if you copy a project from another user/machine. Then open the project. It will create a new settings store on the fly. The project will run just as before and IISExpress works as expected.
If you can't see this folder - it's hidden. So make hidden files visible before this step.
Elder projects and elder VS versions does not have the .vs folder and hence no need to delete it.
I just want to share my experience. In my case, I had VS 2015 and VS 2017 installed on my post. I uninstalled VS 2017 and it caused this problem.
this post worked in my case:
Delete the \Documents\IISExpress
folder using the following console command:
rmdir /s /q "%userprofile%\Documents\IISExpress"
Delete the applicationhost.config
the file which is placed within the \.vs\Config\
folder in your Visual Studio project root folder.
Close Visual Studio and re-start it with Administrative privileges (right-click > Run as Administrator)
.
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.
Add the _CSRUN_DISABLE_WORKAROUNDS
Environment System variable with the value of 1
(As it is shown on the image on the link.) (I didn't do this step on my post, it worked by doing the first 4 steps).
https://www.ryadel.com/en/unable-launch-iis-express-web-server-error-visual-studio-2015-fix/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With