Home ยป Useful tips

Godaddy - Remove 500 Internal Error and Show Actual Detailed Error On IIS6 and 7 In Windows Hosting

  20. Apr 2011 by Soan

Remove 500 Internal Error and Show Actual Detailed Error On IIS6 and 7 In Godaddy Windows Hosting By default, Windows hosting servers like Godaddy display a generic error when any .NET application generates an exception because the detailed error messages may allow a malicious user to obtain sensitive information about the website. Most of the time this is a "500 Internal Server Error" like the one shown in image.

The image that you see on Godaddy windows shared or 4G hosting for 500 internal server error is actually hosted on GoDaddy servers and is shown automatically for your website.

To troubleshoot the actual error, you should modify your web.config file and specify that a custom error message is displayed. A custom error message helps you to locate the specific code that is causing the issue.

Displaying Custom Error Messages / Enabling Detailed Errors on IIS 6

You should include the following tags in your web.config:

<configuration>
    <system.web>
        <customErrors mode="Off"/>
        <compilation debug="true"/>
    </system.web>
</configuration>



Displaying Custom Error Messages / Enabling Detailed Errors on IIS 7

You should include the following tags in your web.config:

<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
        <asp scriptErrorSentToBrowser="true"/>
    </system.webServer>
    <system.web>
        <customErrors mode="Off"/>
        <compilation debug="true"/>
    </system.web>
</configuration>



Once you modify your web.config with the above values, the actual error will be shown instead of 500 internal server error and then you can fix your code accordingly.

Would you like to share this article?

QR Code for this page Scan this QR code to open this
article in any mobile browser
or share with friends.


For more helpful articles like this, subscribe to our free newsletter or stay connected on social networks:

SUBSCRIBE
Subscribe to AM22 tech in Reader or by Email
Sign up for our updates in Email (Free):

 

Have questions? Write into comments or ask in forum