500 Internal Server Error is one of the most common IIS server errors I see daily basis. Most of the time, a coding or configuration issue causes this error.
In a case I have recently worked on, the page was displaying the error below if the user tries accessing the root of the application. There were no issues if they enter the full path.
“The page cannot be displayed because an internal server error has occured”
Failed Request Tracing logs shows this error:
“Either a required impersonation level was not provided, or the provided impersonation level is invalid (0x80070542)”
Solution for “Required impersonation level was not provided or provided impersonation level is invalid (0x80070542)” error
This error occurs when the service account doesn’t have “Impersonate a client after authentication” Permission (Reference).
IIS_IUSRS account to “Impersonate a client after authentication” permission list in the local group policy by following the steps below.
- Go to Start > Settings > Control Panel > Administrative Tools > Local Security Policies
- Expand Local Policies and select User Rights Assignment
- In the right pane, double-click Impersonate a client after authentication
- In the Security Policy Setting dialog box, click Add User or Group
- In the Select Users, Computers or Groups dialog box, type
- Select Check Names and verify that the name is correct
If you see “Configuration data for the page is invalid” message for the 500 error, check this post out: Prevent settings to be overridden by web.config (HTTP Error 500.19)