14
votes

When I start the application pool, and request a page in an application in that pool, I get a "HTTP Error 503. The service is unavailable."

If I look at the application pools in IIS, I can see that it has now stopped. Going to the event viewer I find this error message:

'The identity of application pool Badge.Web 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.'

I'm very sure the credentials I'm using is correct. Something else is causing the app pool to stop.

5
can you replicate this on a another machine?rob
#Ram: Did you find the answer to your question. If yes can you please share it here as i am also facing same issue and the credentials i have provided for application pool user is correct.vinay
You might find this question helpful: stackoverflow.com/questions/863537/…epotter

5 Answers

17
votes

I had similar problem today when an application pool using Windows user identity X stopped working after password change for that user.

Apparently, some information linked to old credentials was stored in the system, and I solved the problem by:

  • switching app pool identity to NetworkService
  • switching it back to X using the new password

So far it's working fine.

6
votes

I found an article saying

The fix is to ensure that the Service/AppPool accounts have the ‘Log on as a batch job’ and ‘Log on as a service’ user rights on the server. This right can be found in Local Security Policy > Computer Configuration > Windows Settings > Local Policies > User Rights Assignment. Either remove the conflicting Group Policy and fix the Local Policy or add the rights to the Group Policy.

http://waveformation.com/2009/06/08/event-5021-the-identity-of-application-pool-lsgroupexpapppool-is-invalid/

4
votes

While there may be several reasons why this may occur, in this specific case, the 503 error was occurring because the Application pool failed to start. This was because the password was changed recently for the Identity under which the application pool was trying to run. Fix was to go to the IIS Manager-> Application Pool -> Advanced Settings -> Process Model -> Identity and set the password to the new one.

It would also help to check the Event Viewer Logs(Event Viewer (Local) -> Windows Logs -> Application to look for specific causes of failure before proceeding to troubleshoot any further.

1
votes

My problem was solved by changing Application Pool Identity to NetworkService, going to Advanced Settings > Process Model > Identity > NetworkService with the desired Application Pool selected.

0
votes

I had the same issue and my solution was: Manager -> Application Pool -> "Select the pool" -> Advanced Settings -> Process Model -> Identity -> NetworkService