500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed. RRS feed

  • Question

  • User-797751191 posted


      In the below code when i set <customErrors mode="Off"/> then i get above error.

    <customErrors mode="On"/>
    <compilation debug="false" targetFramework="4.5"/>
    <httpRuntime targetFramework="4.5" maxRequestLength="20480" executionTimeout="1600" />


    Monday, February 11, 2019 12:22 PM

All replies

  • User-1038772411 posted

    First, you need to enable and see detailed errors of your web messages, because this is a general message without giving information on what's really happening for security reasons.

    With the detailed error, you can locate the real issue here.

    Also, if you can run the browser on the server, you get details on the error, because the server recognizes that you are local and shows it to you. Or if you can read the log of the server using the Event Viewer, you also see the details of your error.

    On IIS 6

            <customErrors mode="Off"/>
            <compilation debug="true"/>

    On IIS 7

            <httpErrors errorMode="Detailed" />
            <asp scriptErrorSentToBrowser="true"/>
            <customErrors mode="Off"/>
            <compilation debug="true"/>

    Note: You can avoid the Debug=true. You only need to close the custom errors for a while and get the detailed error page.

    Reference: Enabling Windows custom error messaging in Go Daddy's help articles.

    Also, this can help: How to enable the detailed error messages (from IIS).

    Monday, February 11, 2019 1:49 PM
  • User1120430333 posted

    The 500 error means the Web program through a .NET exception that was unhandled. Yo need to use a try/catch to expose the exception.

    Monday, February 11, 2019 4:22 PM
  • User753101303 posted


    Or by default, exception details should go to the Windows Event log (Application). I hardly see why switching from On to Off would cause an error but as always with errors it's best to just see which error you have rather than trying to guess...

    Monday, February 11, 2019 6:10 PM