An IIS website may display “HTTP 503 – Service Unavailable” error when the application pools don’t have correct configuration or permissions which causes them to unexpectedly stop. Event ID 5059 clearly shows the reason behind the 503 error: “Application pool has been disabled”.
You may also see 5021 (The identity of application pool %1 is invalid) and 5057 (Application pool %1 has been disabled) in Event Viewer. Here are the detailed error messages:
Event ID 5021
The identity of application pool %1 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.
Event ID 5057
Application pool %1 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.
Event ID 5059
Application pool %1 has been disabled. Windows Process Activation Service (WAS) encountered a failure when it started a worker process to serve the application pool.
Checklist to solve “Application pool has been disabled” error
HTTP 503 status code and 5059 event ID may indicate issues related to account permissions or IIS configuration. Here is a list of things to try. You may need to restart IIS or machine after each change.
- The account used as application pool identity shouldn’t be locked
- Reset the password of the application pool identity account in case it is expired
- Switch from built-in account to domain account for application pool identity
- Use another domain account as application pool identity
- Give “Full Control” to application pool identity account on shared data and configuration folders
- Give “Log on as Batch Job” permission to the application pool identity account
- Add the application pool identity account to
IIS_USRSgroup - Check account information in applicationHost.config for possible typos
- Recreate application pools, websites, and shared configuration (if used)
- Make sure to use the same encryption provider (
IISWASOnlyCngProviderorIISCngProvider) in applicationHost.config - Change application pool process model from
LogonBatchtoLogonService - If it is a shared configuration setup in IIS, use the same
IISWASKey