In this post, we’ll fix “500 Internal Server Error” in SharePoint Server.
We’ll explore the following:
- 1 What’s 500 Internal Server Error?
- 2 500 Internal Server Error IIS Root Causes
- 3 How to solve the 500 Internal Server Error in SharePoint?
Applies To
- SharePoint 2019.
- SharePoint 2016.
- SharePoint 2013.
You may also like to read Security Token Service cannot be activated due to This collection already contains an address with scheme http
What’s 500 Internal Server Error?
“500 Internal Server Error” is a general HTTP status code that refers there is an ambiguous error that occurred in the web server (IIS). but actually the server didn’t know what’s exactly the error to report it.
In the next section, we’re gonna explore a real scenario, list the potential root causes, and explain the proposed solutions for “500 Internal Server Error” in a SharePoint environment.
In SharePoint, when I tried to browse a SharePoint site, I got the below error:
500 – Internal Server Error
500 Internal Server Error IIS Root Causes
As we earlier mentioned, “500 Internal Server Error” is a general wired issue that doesn’t have a specific solution.
Therefore, to be able to investigate this issue based on your environment, you should first check the ULS Log and Event Viewer to can dig deeply into identifying the main root cause.
But in most popular cases, In SharePoint, you may get this error “500 – Internal Server Error” in case of:
- The Web config file might have been modified in an incorrect format.
- The SharePoint Application Pool stopped.
- The Security Token Service Application Pool stopped.
- The Application Pool Identity Account doesn’t have “Impersonate a client after authentication” right in the local security Policy.
In this section, we’re gonna introduce a detailed solution for the above popular root causes for 500 Internal Server Error in SharePoint.
Web config file was modified in incorrect format
Steps
- Open IIS Manager.
- Browse the SharePoint Web Application which you are facing the “500 Internal Server Error” as shown below:
- Once you browse the web application, you will a detailed error message If there is any error in the SharePoint Web Config file.
In our case, we are missing a double quotation for the attribute value, in your case, you may face another error message, therefore try to solve it and make sure that the Web Config file doesn’t have any other errors.
- To fix the SharePoint Web Config Errors, Locate it by browsing the SharePoint web application site as shown below:
Note: It’s strongly recommended to take a backup from the Web.Config file before performing any kind of changes to allow a rollback.
- Edit the config file with an appropriate editor like NotePad, or Visual Studio.
- Save and close.
- Repeat all previous steps for other SharePoint servers.
- Optionally perform IIS Reset by running CMD as Administrator.
- Browse the site again! it would be working properly now if there are no other related web config issues.
Application Pool stopped or not started
The “500 Internal Server Error” may also occur if the related SharePoint Web Application is stopped due to changing the Application Pool Identity Password from Active Directory that not reflected to the IIS automatically and should be set manually.
To check if the Application Pool is stopped or not started, you should follow the below steps:
Steps
- Open IIS Manager.
- From the right side, Click on “Application Pools”.
- Check all Application Pools and make sure that the SharePoint Web Application Pools are started.
Note: To know What’s the corresponding service name for each SharePoint service GUID check this post How to get the corresponding SharePoint services name of the Application Pool GUID.
- If you found out the web application pool status is stopped, so you should start it.
Application Pool Started then Stopped Again
In our case, we have tried to start the application pool that started then quickly stopped again!
Actually, the behavior of “starting Application Pool then stopped again” usually occurs if the password of Application Pool Identity has been changed from Active Directory.
Unfortunately, changing the Application Pool Identity account from AD will not be automatically reflected on the IIS Application Pool. it requires to be updated manually in IIS Manager, by doing the following:
Application Pool Account Password has expired
Steps
- Right-Click on the Application Pool, Select “Advanced Settings”.
- Below Process Model, specifically at “Identity”, click on the “…” eclipse button.
- Update the Application Pool Identity credential with the correct password.
- Go back to Recycle the Application Pool and make sure that it has been started properly.
- Optionally perform IIS Reset by running CMD as Administrator.
- Now, go back to browse the SharePoint Portal again which should be working properly.
Security Token Service Application Pool stopped
If the SharePoint Application Pool started and it’s working properly, and you are still facing the “500 Internal Server Error“, so you may face this issue due to the Security Token Service Application Pool stopped.
In this case, try to start Security Token Service Application Pool as shown below:
If the Security Token Service Application Pool status changed back to “Stopped”, so try to update the password of the Security Token Service Application Pool Identity account as the following:
Steps
- Right-Click on the Security Token Service Application Pool, select “Advanced Settings”.
- Below “Process Model”, specifically at “Identity”, click on the “…” eclipse button.
- Update the Application Pool Identity credential with the correct password.
- Optionally perform IIS Reset by running CMD as Administrator.
- Now, go back to browse the SharePoint Portal again which should be working properly.
Grant “Impersonate a client after authentication” right for Application Pool Account
In some cases, the Application Pool Account may be removed from the “IIS_IUSRS” group, Therefore, the “Impersonate a client after authentication” right will be revoked for this account.
To grant “Impersonate a client after authentication” right for Application Pool Account, you should do the following:
- Login to the Server with the Administrator Account.
- Run “secpol.msc“.
- Go to “Security Settings” > “Local Policies” > “User Rights Assignments”.
- From the right side, double-click on “Impersonate a client after authentication” to grant this right for the Application Pool Account.
- Run the below command to apply the policy. (Server Restart may be required)
gpupdate /force
You may also like to read SharePoint 2019: Service Accounts Recommendations
Conclusion
In conclusion, we have tried to explore the popular root causes for the “500 Internal Server Error In SharePoint” that we faced in our environment. Also, we have explained the appropriate fixes for theses causes.
As we mentioned later, these root causes may differ from one environment to another, so please don’t hesitate to share any further causes that you have faced in your environment in the comments.
You might also like to read
Have a Question?
If you have any related questions, please don’t hesitate to ask it at deBUG.to Community.
you saved my entire night : ) thank you v much
Thank you for posting this! Just saved my butt on a Saturday. Saw this error after rebooting my SharePoint server for OS updates. Saw the stopped application pool and discovered the service account was locked out! I thought I was going to have to spend the rest of my day removing windows updates and / or calling Microsoft Support.
It solved my problem, thank you
Glad to hear it helped you
Thanks for this great info
Glad to hear it helped you.
You’re welcome ♥
Thanks for this great article