ASP. NET project Publishing-current custom error settings prevent remote viewing of applications

Source: Internet
Author: User

The morning of the server system suddenly went wrong, tragedy ~

============== Exception Information: ==============================

An application error occurred on the server. Current custom error settings for this application prevent remote viewing of applications

Description: An application error occurred on the server. The current custom error settings for this application prevent you from viewing the details of application errors.

More information: To enable others to view the details of this specific error message from the local server computer, create a <customErrors> tag in the "Web. config" configuration file located at the root of the current WEB application. The "mode" property of this <customErrors> tag should then be set to "RemoteOnly". To enable others to view details on a remote computer, set mode to OFF.


<!--the Web. config configuration file--

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

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.

=================================================================================

Find a long time to solve the problem, and finally found the following solutions:

Workaround: The configuration file Web. config and bin directory of the ASP. NET application and the aspnet_client directory (if any) must be placed in the virtual directory. For the common use of virtual host owners, usually only the root directory is a virtual directory, so to realize the normal operation of the program without large changes, you can put the Web. config and bin directory and the aspnet_client directory (if any) to the root directory. If you feel that this is inconvenient, not conducive to overall management, then you can only ask the administrator to help you set the directory of the program as a virtual directory, and this virtual directory to be configured to the application level, so that the program can run normally, and does not adversely affect the structure of the site, however, Usually this kind of service is to charge!

My practice is: To run the program again, and then generate the Directory Bin folder to copy to the server to cover the original, The miracle appeared, the problem solved

ASP. NET project Publishing-current custom error settings prevent remote viewing of applications

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.