We recently upgraded to .Net 4.0 and wrote a custom deployment script for our application that uses the
Microsoft.Web.Administration library to do things like create websites and setup app pools. We started testing the code on developer boxes and it seemed to work. Then we noticed that if the dev re-built the application it would stop running and IIS7 would give us this (practically useless) error message:
Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.
Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.
If we manually recycle the application pool the app will start right back up. We don't see any events or errors in the Application Log. The pool is set to automatically start and recycle on configuration changes.
We have tried every combination of setting in the app pool, application and ASP.net settings. We have tried running the app pool as different user accounts. We have tried deleting the app pool and the application and re-creating both by hand through the UI and the problem still persists.
It's as if using the
Microsoft.Web.Administration library poisons the machine so it will never automatically restart app pools again??!!
We would appreciate any insight or debugging advice. We cant run this on any production systems until we understand what caused this to happen.