"The page cannot be displayed because an internal server error has occurred."

Hong 1,046 Reputation points
2024-03-20T03:49:39.6433333+00:00

I know it is a common error and I have done some search. I thought I did the work to get more details by modifying web.config:

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

<system.web>

<customErrors mode="Off" />

</system.web>

<system.webServer>

<!--This is to allow the web server to serve resources with the appropriate file extension-->

<staticContent>

<remove fileExtension=".appx" />

<remove fileExtension=".msix" />

<mimeMap fileExtension=".appx" mimeType="application/appx" />

<mimeMap fileExtension=".msix" mimeType="application/msix" />

<mimeMap fileExtension=".appxbundle" mimeType="application/appxbundle" />

<mimeMap fileExtension=".msixbundle" mimeType="application/msixbundle" />

<mimeMap fileExtension=".appinstaller" mimeType="application/appinstaller" />

</staticContent>

<httpErrors errorMode="Detailed" />

</system.webServer>

</configuration>

I am still getting the following error for https://www.my.domain/foo/test/index.html

"The page cannot be displayed because an internal server error has occurred."

Could anyone offer a tip on how to diagnose this?

Internet Information Services
0 comments No comments
{count} votes

Accepted answer
  1. Yurong Dai-MSFT 2,781 Reputation points Microsoft Vendor
    2024-03-20T06:48:37.5033333+00:00

    Hi @Hong,

    If you get such an error even when detailed errors are enabled, right-click anywhere in the browser window and select Inspect (or press F12). This will open the developer tools in a browser window. Now, click on the Console tab. The actual errors thrown by the web server will be displayed.

    If the console prompts: the server responded with a status of 500, then you need to enable Failed Request Tracing to further understand the exact cause of the 500 error.

    Try to reproduce the issue and open the newly generated XML log file. You will see detailed error messages and sub-status codes to help you locate the problem.


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

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the email notification for this thread.

    Best regards,

    Yurong Dai

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful