-4

Our client wants to be able to redesign the page which displays an "Unhandled Exception".

We're using Visual Studio 2012 with C#.NET (ASPX).

Is this possible to do?

Edit: Thanks for the downvotes. Care to explain why?

1

From Microsoft: Displaying a Custom Error Page (C#):

When an unhandled exception arises in an ASP.NET application one of three types of error pages is displayed:

  • The Exception Details Yellow Screen of Death error page,
  • The Runtime Error Yellow Screen of Death error page, or
  • A custom error page

Short version:

  • Create a custom web page in your ASP.NET web app.
  • Add customErrors markup to the configuration -> system.web section of your application's web.config file:

    <system.web>
        <customErrors mode="RemoteOnly"
                      defaultRedirect="~/ErrorPages/Oops.aspx" />
    </system.web>
    

See the above link for additional information on how to do it, as well as how to add custom pages for individual HTTP status codes, etc.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.