If you've stumbled upon this post you most likely experienced the following error message when you tried to run your web application in debug mode:
Unable to start debugging on the web server. Could not start ASP.NET debugging. More information may be available by starting the project without debugging.
If you've recently upgraded your system to Windows 10 I strongly suggest to jump down to the URL Rewrite Module Broken paragraph and follow the advices below: otherwise, keep reading.
Despite what the error message says, starting the project without debugging won't give you more informations. Luckily enough, the issue is fairly known to ASP.NET developers thanks to many threads on IT resources websites such as StackOverflow. The cause has almost always something to do with the Application Pool used by your web application - usually the DefaultAppPool, unless you've chosen otherwise - which stopped working for no apparent reason.
First thing you can do is to try to manually restart it. In order to do that, go to Control Panel > Amdministrative Tools > IIS Manager > Application Pools, then click on the DefaultAppPool with the right mouse button and choose Start. As soon as you do that, perform an iisreset, wait for the reset and then try again the debug with Visual Studio to see if the problem is gone. If that's so, you're done: otherwise, go back to the IIS Manager > Application Pools panel and check again the DefaultAppPool status: if it's stopped again, it means that something on your system causes the Application Pool crash which you need to find out.
The most common causes preventing the Application Pools to behave like that are usually two:
- Missing permissions in the Web Application folder.
- URL Rewrite Module Broken, an issue which is often related to a system upgrade (for example, from Windows 8 or 8.1 o to Windows 10).
Let's see how we can handle either of them.
Missing permission
This issue has been experienced by many users and has been reported frequently (such as in this thread) in the IIS official forum. First thing to do is to check if your Web Application folder has sufficient permissions to allow access to the Application Pool. Ensure that either IIS_IUSRS and IUSR (or the user impersonated by the Application Pool if there's a specific one) do have read and execute rights, otherwise:
- Set up the missing permissions accordingly.
- Restart the Application Pool from IIS Manager > Application Pool
- Restart the IIS instance by opening a command prompt with administrative rights and typing iisreset.
- Try again to run your web application using Visual Studio's debug mode and check if the problem is gone.
Again, if the error is still there you need to check the DefaultAppPool status: if it's automatically stopping again, keep reading.
URL Rewrite Module Broken
This kind of issue is most frequent following a system upgrade, usually from Windows 8.1 to Windows 10, due to the fact that the installation process can occasionally break the IIS URL Rewrite module 2.0. To see if that's what happened to your system, open the Event Viewer from Control Panel > Administrative Tools > Event Viewer. Once you get there, check the Windows Registry > Application tab and look for Origin IIS-W3SVC-WP and ID event 2280 event logs: chances are you'll find a lot of them.
Open one of them and check if the error message looks like the following:
The Module DLL C:\WINDOWS\system32\inetsrv\rewrite.dll failed to load.
If you get this text, you've find the root of your problem. Luckily enough, all you need to do to solve that is to uninstall and reinstall the URL Rewrite module using the Control Panel software uninstall panel. You can then get the updated version from the Microsoft Web Platform Installer or downloading it from the official site:
- Microsoft URL Rewrite Module for IIS 2.0 (x86), for 32-bit architectures.
- Microsoft URL Rewrite Module for IIS 2.0 (x64), for 64-bit architectures.
That's it for now: happy debug!
Thank you, you saved me hours. One thing to point out is that the error message in the Event Viewer might be different. In that case, installing Microsoft URL Rewriter won’t do anything for you(btw, that link doesn’t download from Microsoft’s website). My error was different, but you helped me find it. The error was solved like this – https://chrisfleischhacker.wordpress.com/2013/12/16/iis-7-application-pool-stops-hipiisenginestub-dll-failed-to-load/
Thank you for the reply. I added your case scenario to the post and also mentioned you and the referenced post at the end. Many thanks for improving this.
Groovy. Thanks for the shout-out.
ya right sir
A big shout out to you on this post. Accidentally stumbled on this site after many frustrated and failed suggestions gotten from other sites. This post looks more like a definitive answer from one who has a depth of the causes and likely solutions to this common issue. Many just proffer solution perhaps just gotten from other sites without delving to the cause(s). Often time, it doesn’t work. One of yours works for me like magic. Thanks.
Glad it helped and thanks to you for the great comment.
Thank You Sir.
finaly solved my problem.