Recently I faced with interesting problem. I resume work over ASP.Net MVC application which I didn’t touch some time (I think all of us have such projects in the private SC repository). It is configured to use local IIS in web project settings in Visual Studio. However when I build and and run without changes IE showed me “Service Unavailable” error page (HTTP Error 503. The service is unavailable).
Site was running in IIS. Then I checked application pool for the web application – and it was stopped. Relaxing with the thought that problem is found I ran app pool and refresh the page. However I still get the same result: “Service Unavailable”. I checked app pool again – it was stopped. I tried to run it again and got the same result. IIS forced my app pool to stop each time when request went to the server.
A bit confusing, I checked event log and found interesting error record in System logs:
Application pool ASP.NET v4.0 has been disabled. Windows Process Activation Service (WAS) encountered a failure when it started a worker process to serve the application pool.
And couple of warnings – also interesting. The first was:
Application pool ASP.NET v4.0 has been disabled. Windows Process Activation Service (WAS) did not create a worker process to serve the application pool because the application pool identity is invalid.
And the second:
The identity of application pool ASP.NET v4.0 is invalid. The user name or password that is specified for the identity may be incorrect, or the user may not have batch logon rights. If the identity is not corrected, the application pool will be disabled when the application pool receives its first request. If batch logon rights are causing the problem, the identity in the IIS configuration store must be changed after rights have been granted before Windows Process Activation Service (WAS) can retry the logon. If the identity remains invalid after the first request for the application pool is processed, the application pool will be disabled. The data field contains the error number.
And I remember that some time ago I changed password for account which was used for this app pool. It was the actual reason. I go to IIS manage > select app pool > Advanced settings > Identity > Click “…” > Click “Set…” button and specify new password. After it I started app pool again and refresh page in browser. Problem disappeared. Hope it will help someone.