asp.net error page How to set asp.net error page Setup method

Source: Internet
Author: User

To use IIS to set asp.net when an error occurs, whether it displays an error message, a custom message, or a native display of the error message and a remote display of custom information.

As shown above, if you set up in IIS, you must fill in the "Default page", which is the page you want to jump when an error occurs. I think this is a BUG, "default page" should not be required, even if it is required, it should be based on "mode" to determine some cases are required.

Also, here say "absolute URL", in fact, not necessarily "http://" beginning, directly write file name can also work.

Of course, this setting, we can also manually set in the web.config, so that "default page" can not fill out.

<system.web>

<customerrors defaultredirect= "error.htm" mode= "RemoteOnly"/>
We can remove the defaultredirect= "error.htm". This way, when an error occurs, it is not a jump surface, but instead appears as follows:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.