What I\'m doing:
I faced this issue in .net core 2.0 when I update my project's port number.
I was able to sort out issue in two steps :
I just changed my profile from "IIS Express" to "MyProjectName" (which I think is using kestrel as the http server instead of IIS) and now it's working fine:
I just encountered the same problem and I killed all the "iisexpress.exe" processes that were still running. That worked for me!
For me the problem was that an other process was using the same port. (In my case it was outlook that was using the same port as my site and thus my site couldn't start)
Yes you can change the local port, but if you are running an API or something that other applications need, you don't always want to do this.
To get a list of what applications are using what port open CMD and type "netstat -aon" You will get a list of ports. Find the port that your site should use, or that you want to use and write down / remember the PID.
Now open task manager and click on the tab 'details'. Find the process with your PID and end it. Now you should be able to start IIS Express with that port.
I had this issue on .net core 2.1, visual studio version 15.9.6. When i deleted the .vs folder, i reopened visual studio and the problem was still there. The solution that worked for me below:
Other Solutions:
For me, it was a mixture of following these instructions:
Delete your web application’s .vs\applicationhost.config and try again.
And then, perhaps most importantly, running Visual Studio with admin privileges.