How to stop my Sharepoint communication site from having the 500 Internal Server Error

Tevon2.0 1,101 Reputation points
2023-05-02T16:05:05.3866667+00:00

When using my SharePoint 2019 server communications site I randomly will see a 500 Internal server error when going to different pages. How can I resolve this and what is typically the cause?

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,223 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,673 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,807 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Ling Zhou_MSFT 13,185 Reputation points Microsoft Vendor
    2023-05-03T10:03:35.0633333+00:00

    Hi @Tevon2.0 ,

    Thanks for posting in the community. I checked the relevant information and found that500 Internal Server Error may be caused by:

    • Web config file have been modified in an incorrect format.
    • The SharePoint Application Pool stopped.
    • The Security Token Service Application Pool stopped.

    You could follow below tips to troubleshoot the issue.

    Have you changed the farm account password?

    1.Open IIS Manager -> Browse the SharePoint web application which you are facing the 500 Internal Server Error -> Get a detailed error message If there is any error in the SharePoint Web Config file.

    Browse the SharePoint site from IIS

    500 - Internal server error in SharePoint

    2.Open IIS Manager -> Application Pools -> Find the web application pool status is stopped, then start it.

    If application pool is started, then stopped again, select the web application pool -> Advanced Settings -> Identity -> Use the farm account with correct password.

    3.Open IIS Manager -> Application Pools -> Check whether Security Token Service Application Pool is started.

    4.Make sure that firewall is off.

    5.Make sure that SharePoint Timer service is running.

    6.Do IIS reset.

    I found an article detailing how to troubleshoot and fix this problem, which you can view by clicking on 500 Internal Server Error SharePoint (devoworx.com)

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link. 


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


  3. Ling Zhou_MSFT 13,185 Reputation points Microsoft Vendor
    2023-05-04T01:31:51.4766667+00:00

    Hi @Tevon2.0 ,

    The second diagram is that I found an error in my SharePoint Web Config file when I tested it here, I am missing a property value in double quotes, this diagram is only used to show that there is an error in the Web Config file, if there is no problem with your Web Config file, then ignore this cause of the 500 error.

    Let me confirm with you: the SharePoint network profile, the network application pool and the security token service application pool are all working properly, but still getting 500 errors, right?

    Then please try granting the right to "impersonate a customer after authentication" for the 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
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".