On Localhostlocalhost I have Set Custom Errorset custom error mode off in web.configweb.config. There is no Application_ErrorApplication_Error method in global.asaxglobal.asax. I have also commented HandleErrorAttributeHandleErrorAttribute in Filter.configfilter.config, but still iI am not getting Detaildetailed error message / Yellowyellow screen of err / stacktrace onin my mvcASP.NET MVC app.
System.webSystem.web section in web.configweb.config:
<system.web> <caching> <outputCache enableOutputCache="false" /> </caching> <globalization culture="auto" uiCulture="auto" /> <customErrors mode="Off" /> <compilation targetFramework="4.5" debug="true" /> <httpRuntime targetFramework="4.5" maxRequestLength="524288000" executionTimeout="3600" requestLengthDiskThreshold="524288000" maxQueryStringLength="204800" maxUrlLength="409600" enable="true" /> </system.web> Having BelowI have this line of codeconfig in System.webserversystem.webserver:
<system.webServer> <httpErrors errorMode="Detailed"/> But when I execute simple code belowshown here in Home Controller Index Actionthe HomeController's Index action method, it is goingredirecting to the /Home/Error Page/Home/Error page instead of showing yellow error page or detailed error page:
public ActionResult Index(string returnUrl) { int b = 0; int a = 5 / b; ViewBag.Message = "Welcome BP DHC Application."; ViewBag.ReturnUrl = returnUrl; return View(); }