swabygw
swabygw

Reputation: 913

How to disable detailed "Compilation Error" output in web page

I would like to disable the detailed "Compilation Errors" page that is displayed when an error occurs on my ASP.NET website. It shows:

Here's what I've already attempted:

Ideally, I'd like not to reveal the Compilation Error. So, I'd like to know: a) how to disable these details from being displayed and show the default, and/or b) how to show my custom errors page, instead. Thank you.

Upvotes: 0

Views: 6281

Answers (1)

dario
dario

Reputation: 5269

You can customize it inside the web.config:

<customErrors defaultRedirect="GenericError.htm"
              mode="On">
  <error statusCode="500"
         redirect="InternalError.htm"/>
</customErrors>

More informations here.

Upvotes: 1

Related Questions