Asp. NET error handling: Runtime error

Source: Internet
Author: User
Tags config error handling net root directory
An application error has occurred on the server. The current custom error setting for this application prevents viewing details of application errors.

Runtime Error
Run-time error

Description:an Application error occurred on the server. The current custom error settings is application prevent the details of the application error from being viewed Remo Tely (for security reasons). It could, however, is viewed by browsers running on the local server machine.
Description: An application error occurred on the server. The current custom error setting for this application prevents viewing details of application errors.

Details:to enable the details of this specific error message to is viewable on remote machines, please create a <custo Merrors> tag within a "Web.config" configuration file located in the root directory of the current Web application. This <customErrors> tag should then have's "mode" attribute set to "off".
More information: To enable others to view the details of this particular error message from the local server computer, create a <customErrors> tag in the "Web.config" profile located in the root of the current WEB application. You should then set the "mode" property of this <customErrors> tag to "RemoteOnly". To enable others to view details on a remote computer, set mode to OFF.

<!--web.config Configuration File-->

<configuration>
<system.web>
<customerrors mode= "Off"/>
</system.web>
</configuration>

Notes:the Current error page are seeing can is replaced by a custom error page by modifying the "defaultredirect" att Ribute of the application ' s <customErrors> configuration tag to a custom error page URL.
Note: You can replace the current error page you see with a custom error page by modifying the "defaultredirect" property of the application's <customErrors> configuration tag to point to the URL of the custom error page.

<!--web.config Configuration File-->

<configuration>
<system.web>
<customerrors mode= "RemoteOnly" defaultredirect= "mycustompage.htm"/>


</system.web>
</configuration>



Related Article

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.