How to install web.config file to display full error message

I deployed my MVC-3 application on Windows Azure. But now, when I request it through the 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 due to security reasons. I know that we can do this through the web.config file. But how?

+122
c # web-config asp.net-mvc-3
Jul 26 '12 at 8:29
source share
3 answers

not sure if it will work in your script, 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"

+230
Jul 26 2018-12-12T00:
source share

It can also help you by showing full error information in the client browser.

 <system.web> <customErrors mode="Off"/> </system.web> <system.webServer> <httpErrors errorMode="Detailed" /> </system.webServer> 
+108
Nov 24 '16 at 5:19
source share

If you are using ASP.NET MVC, you may also need to remove HandleErrorAttribute from the Global.asax.cs file:

 public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); } 
+10
Jul 26 2018-12-12T00:
source share



All Articles