Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I deployed my MVC-3 application on windows Azure. But now when I am requesting it through staging url it shows me (Sorry, an error occurred while processing your request.). Now I want to see the full error message, by default it is hiding that because of some security reasons. I know that we can do this through web.config file. But how?

like image 533
King Kong Avatar asked Jul 26 '12 08:07

King Kong


People also ask

How do I enable the details of this error message to be viewable on remote machines?

Details: To enable the details of this specific error message to be viewable on remote >machines, please create a tag within a "web. config" configuration file >located in the root directory of the current web application. This tag >should then have its "mode" attribute set to "Off".

How do I enable detailed error messages in IIS 7?

To Enable detailed IIS Error messages:Open Internet Information Services (IIS) Manager. Select "Error Pages" Select "Edit Feature Settings" Select "Detailed Errors"


1 Answers

Not sure if it'll work in your scenario, but try adding the following to your web.config under <system.web>:

<system.web>     <customErrors mode="Off" />     ... </system.web> 

works in my instance.

also see:

CustomErrors mode="Off"

like image 139
jim tollan Avatar answered Sep 21 '22 12:09

jim tollan