Visual Studio "Unable to start debugging on the web server. The web server did not respond in a timely manner."

Viewed 73716

I get the following error pretty regularly when compiling in Visual Studio and running my web application:

"Unable to start debugging on the web server. The web server did not respond in a timely manner. This may be because another debugger is already attached to the web server."

Normally this is after having debug the application once already. From the command line I run "iisreset /restart" and it fixes the problem.

How do I prevent this from happening in the first place?

31 Answers

I find that this happens if I'm debugging with Firefox as my browser. When I exit Firefox the VS2005/8 debug session doesn't terminate. I have not found a solution for this (yet).

If this is what's happening with you then a quicker solution than running iisreset is to hit Shift-F5 when in Visual Studio and this will terminate the current debug session. You can then hit F5 and this will start a new debug session.

Go to task manager and end process aspnet_wp.exe before running application

It sounds like you are probably hitting F5 in Visual Studio when you receive this error?

There are a few things you can try. The easiest is to hit the Stop button before hitting F5. Optionally, when you are finished debugging and starting to make changes you can go to the Debug menu and choose either Stop Debugging or Terminate All.

When debugging 2 web application (1 MVC and 2 is MVC WebAPI) that are both hosted in the local IIS. Make sure that each application is using a different application pool. I encountered the same issue and as soon as I change the app pool of the other one, it worked!

It sounds like something is eating up your web server's resources. Perhaps you have some resources (file handlers, wcf proxies) that are being opened and not closed? I've had this happen to me specifically when I was not closing WCF client proxy connections.

The problem is not necessarily that you have a debugger attached, but only that the web server is not responding in a timely manner. Note that the message says "This may be because another debugger is attached".

If you have a lot of break points this will slow the debugging process down, so remove unneeded break points and close the Autos window this will solve your problem

The issue is normally there when an another instance of iexplore is still running. I used to have the issue when my IE crashes but I can still see it in the Task Manager. Once you "End Process" everything is back to normal :)

I got it worked by creating a new ApplicationPool in the IIS Server and pointing my application to the new ApplicationPool. I have also deleted the old ApplicationPool

In my case it gets solve deleting all breakpoints. Looks like I had a lot of breakpoints(conditional and not conditional) and it was causing lack of resources .

Related