I want to set the custome error to be true to prevent users from viewing detailed info about my application. But I cannot find where I should write this <customErrors mode="on">
; should it be in the web.config or in the web, debug.config or else where?
BR
From my experience, we should turn custom error to On in release mode and turn it off in debug. To automatically do this, we can use web.config transformation like the following example.
Web.Debug.config
This setting will allow web server to display ASP.NET yellow page that contain useful error information.
<customErrors mode="Off" xdt:Transform="Replace" />
Web.Release.config
In the other hand, we don't want user to know technical error. We should use custom error page instead of ASP.NET yellow page.
<customErrors mode="On" xdt:Transform="Replace" />