I'm getting a '500 internal server error' while trying to access any web application other than the central administrator page. This problem appeared suddenly when I tried opening the sites. No password change have been made on the server side; also I have verified all the application pools are in the started state only. I have checked by creating a new web application; still, the same issue occurs. I have also tried by changing the identity of the specific web application from IIS, but it doesn't work. I was not able to set the username and password for identity over the advanced settings of SecurityTokenServiceApplicationPoolService in the application pool as it is saying 'invalid credentials'
.
SharePoint is installed on SQLServer 2008 R2. When I checked Event viewer I'm getting two warnings and two errors. Two errors saying Claims Authentication(8306) and warnings as configuration(8059) (I know this Question was already asked in the SharePoint community but the answers did not solve my issue so that I'm asking it here)