Common Mistakes in Asp.net web project deployment

Source: Internet
Author: User

In the long-term development of Asp.net projects, it is very common to deploy web projects. Then there is a lot of common thingsProgramDevelopers and even programmers who have been developing for many years will encounter some mistakes that should not be made during deployment:

Error 1: after the development of the Asp.net project is completed, the compiled DLL is directly deployed when debug debugging is used.

Correct practice: Upload the DLL file after the Asp.net project is compiled in release mode, which is more concise and effective than the DLL file generated in debug mode.

Error 2: When the WEB Project is deployed on the server, set the debug option of compilation in the web. config file to true.

Correct practice: Set compilation debug to false during deployment. In this case, the. NET program will respond much faster during running than when debug is set to true.

Error 3: directly deliver the error prompt to the customer without any processing. In Asp.net, we often use try catch finally to catch exceptions, while web. the default setting of the error prompt in config is: <customerrors mode = "off"/>. We 'd better set it to remoteonly. In addition, it is best to make some corresponding errors into the corresponding error response page. In addition, you can add a link to the error page and return it to the Home Page. In this way, the user experience will be much better.

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.