Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 - ASP.Net application won’t start until restarting Visual Studio

Sometimes when I try to start a ASP.Net application (debugging) the application will not start. Visual studio looks like the application is running, the status bar changes its color to orange. A Browser opens and is loading “forever”. IIS Express is running and the site gets displayed in the context menu of the IIS try application. I do not get any exception; the application just won’t start.

I tried to stop debugging and manually stopped IIS Express and started debugging again, but it didn’t work. The only thing which works is closing Visual Studio and open it again. Then I can start the application n times until I get the same problem again.

The application is not the problem, I never had this problem debugging the same application with Visual Studio 2013.

  • Is there a solution to this problem?
  • Do log files or something like this exist where I can find information about what is wrong?

I’m working with Visual Studio 2015 Update 1.

like image 536
musium Avatar asked Dec 11 '15 09:12

musium


2 Answers

Solution/Workaround:

I still have the same problem and I can’t find a way to solve it.
But the following script works as a workaround:

taskkill /f /im iisexpress.exe 

It kills iisexpress which seams to cause the problem.

like image 130
musium Avatar answered Sep 20 '22 01:09

musium


tasklist /fi "imagename eq iisexpress.exe" |find ":" > nul
if errorlevel 1 taskkill /f /im "iisexpress.exe"

This command will solve the first debug problem. Kills iisexpress.exe, when it's executed. Not every time.

like image 33
Yerkon Avatar answered Sep 21 '22 01:09

Yerkon