Once in a whereas I encounter a slip-up that doesn’t give any useful data. this can be specifically what happened the opposite day I opened my SharePoint website and found out that the web site cannot show the page due to HTTP 500 Internal Server Error on my SharePoint 2013. First thing I attempted to try and do is open SharePoint Central Administration, to see if i get constant error message. Strangely, I used to be ready to open Central Administration with none errors.

Open the IIS Manager to make sure SharePoint 2013: eighty Application Pool was running, and that i noticed  that SecurityTokenServiceApplicationPool application pool was stopped.

I started SecurityTokenServiceApplicationPool application pool, refreshed my SharePoint website however that didn’t resolve the problem. I opened IIS manager and noticed  that SecurityTokenServiceApplicationPool was stopped once more.

In that case, smartest thing to try and do was to open IIS events log and check what’s occurring with SecurityTokenServiceApplicationPool application pool.

IIS event log showed the warning ID 5021:

The identity of application pool SecurityTokenServiceApplicationPool 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.

To Fix this error:

1. Back to IIS manager -> SecurityTokenServiceApplicationPool application pool-> Advanced Settings.

2. Go to the Identity option.
3. Then, Update the user’s credentials and click OK button. I performe IISreset.
4. Open the IIS manager once more to examine if it worked. SecurityTokenServiceApplicationPool was now started and didn’t stop any longer.

5. Finally, my SharePoint 2013 site was operating again!