Coding⏱️ 2 min read📅 2026-06-03

How to Fix: How to set web.config file to show full error message

Show full error message in MVC-3 application on Azure

Quick Answer: Add the following configuration to your web.config file:

In ASP.NET MVC, the full error message is often hidden for security reasons. However, you can configure your web.config file to display the full error message in a staging environment or when debugging.

🔍 Why This Happens

  • [The error message is hidden by default to prevent sensitive information from being exposed.

🛠️ Step-by-Step Verified Fixes

Method 1: Enabling Detailed Error Messages

  1. Step 1: Open your web.config file and add the following configuration:
&<system.webServer> &<httpErrors errorMode='Detailed' /> &</system.webServer>

Method 2: Using the debug Element

  1. Step 1: Open your web.config file and add the following configuration:
&<system.web> &<compilation debug=True /> &</system.web>

✨ Wrapping Up

By following these steps, you should now see the full error message in your staging environment.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions