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?
Asked
Active
Viewed 3.3e+01k times
180
3 Answers
297
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:

Uwe Keim
- 39,551
- 56
- 175
- 291

jim tollan
- 22,305
- 4
- 49
- 63
-
25In addition add the following in the < **System.webServer** > add
– Kasper Jensen Sep 14 '16 at 06:21
167
This can also help you by showing full details of the error on a client's browser.
<system.web>
<customErrors mode="Off"/>
</system.web>
<system.webServer>
<httpErrors errorMode="Detailed" />
</system.webServer>

Leyla Zwolinski
- 85
- 7

Meer
- 2,765
- 2
- 19
- 28
-
1For more detail see [customErrors Element (ASP.NET Settings Schema)](https://msdn.microsoft.com/en-us/library/h0hfz6fc(v=vs.85).aspx) – stomy Oct 30 '17 at 16:58
-
See [httperrors](https://learn.microsoft.com/en-us/iis/configuration/system.webserver/httperrors/) – stomy Oct 30 '17 at 17:01
-
See [the difference between customErrors and httpErrors](https://stackoverflow.com/a/2481102/7794769) – stomy Oct 30 '17 at 17:05
-
4This is better than the accepted answer bcuz most devs want to see the details instead of YSOD with no details. – Spencer Nov 30 '17 at 18:12
16
If you're using ASP.NET MVC you might also need to remove the HandleErrorAttribute from the Global.asax.cs file:
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}

Sandrino Di Mattia
- 24,739
- 2
- 60
- 65
-
Would I have access to this **Global.asax.cs** file in a `plesk` environment? And where is that file located? The other suggestions are not working; and I need it for a sub-domain. – MeSo2 Dec 08 '22 at 18:45