500 Internal Server Error SharePoint

500 Internal Server Error in SharePoint

In this post, we’ll fix “500 Internal Server Error” in SharePoint Server.

500 - Internal Server Error in SharePoint

We’ll explore the following:

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.

500 Internal Server Error in SharePoint

In SharePoint, when I tried to browse a SharePoint site, I got the below error:

500 – Internal Server Error

500 - Internal Server Error in SharePoint

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:

  1. The Web config file might have been modified in an incorrect format.
  2. The SharePoint Application Pool stopped.
  3. The Security Token Service Application Pool stopped.
  4. The Application Pool Identity Account doesn’t have “Impersonate a client after authentication” right in the local security Policy.

How to solve the 500 Internal Server Error in SharePoint?

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.
Open IIS Manager
  • Browse the SharePoint Web Application which you are facing the “500 Internal Server Error” as shown below:
Browse the SharePoint site from IIS
  • Once you browse the web application, you will a detailed error message If there is any error in the SharePoint Web Config file.
500 - Internal server error in SharePoint

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:
Explore Web site in IIS Manager

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.
The server was unable to save the form at this time. Please try again.
  • 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.
Open IIS Manager

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.
SharePoint Application pool List in IIS Manager

Application Pool Started then Stopped Again

In our case, we have tried to start the application pool that started then quickly stopped again!

Start App pool in IIS Manager

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”.
App pool - Advanced Settings
  • Below Process Model, specifically at “Identity”, click on the “…” eclipse button.
SharePoint App pool Service Account Identity
  • Update the Application Pool Identity credential with the correct password.
Set Application Pool Identity Credentials
  • Go back to Recycle the Application Pool and make sure that it has been started properly.
500 - Internal Server Error In SharePoint
  • Optionally perform IIS Reset by running CMD as Administrator.
The server was unable to save the form at this time. Please try again.
  • Now, go back to browse the SharePoint Portal again which should be working properly.
Browse the SharePoint site from IIS

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:

Security Token Service Application Pool stopped in SharePoint

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.
SharePoint App pool Service Account Identity
  • Update the Application Pool Identity credential with the correct password.
Set Application Pool Identity Credentials
  • Optionally perform IIS Reset by running CMD as Administrator.
The server was unable to save the form at this time. Please try again.
  • Now, go back to browse the SharePoint Portal again which should be working properly.
SharePoint PWA Site Collection

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“.
Local Security Policy for SharePoint
  • Go to “Security Settings” > “Local Policies” > “User Rights Assignments”.
User Rights Assignment for SharePoint Accounts
  • From the right side, double-click on “Impersonate a client after authentication” to grant this right for the Application Pool Account.
500 Internal Server Error SharePoint
  • 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.

8 thoughts on “500 Internal Server Error SharePoint”

  1. 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.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top