Issue: Website cannot display the page due to HTTP 500 Internal Server Error.
I tried to do open SharePoint Central Administration, to see if I get the same error message. Strangely, I was able to open Central Administration without any errors.
I opened IIS Manager to make sure SharePoint – 80 Application Pool was running, and I noticed that SecurityTokenServiceApplicationPoolapplication pool was stopped.
I started SecurityTokenServiceApplicationPool application pool, refreshed my SharePoint site but that didn't resolve the issue. I opened IIS manager and noticed.that SecurityTokenServiceApplicationPool was stopped again.
I Check the IIS events log to check what’s the issue with SecurityTokenServiceApplicationPool application pool.
The Disable-SPSessionStateService cmdlet turns off the session state service. If your farm does not depend on session state service, we recommend that you disable it.
We can disable session state by Disable-SPSessionStateService command.
We have some optional parameters to disable session state. We can write the command as
Disable-SPSessionStateService -AssignmentCollection AssignmentCollectionForSharePoint -ConfirmConfirmationSwitchParameter –WhatIf ConfirmationSwitchParameter