Several methods to improve ASP. NET performance

Source: Internet
Author: User

Optimize configuration files for Web server computers and specific applications to meet your specific needs

By default, ASP. NET configuration is set to enable the widest range of features and adapt to the most common solutions. Therefore, application developers can optimize and modify some of the Configurations Based on the functions used by the application to improve ASP. NET performance. The following lists some options you should consider.

Only enable authentication for the desired application

By default, the authentication mode is Windows, or NTLM is integrated. In most cases, it is best to disable authentication in the Machine. config file and enable authentication in the Web. config file for applications that require authentication. Configure the application based on the appropriate request and response encoding settings. ASP. NET default encoding format is UTF-8. If your application is strictly ASCII, configure the application to use ASCII for a slight performance improvement.

Disable AutoEventWireup for Applications

In the Machine. config file, set the AutoEventWireup attribute to false, which means that the page does not match the method name with the event or hook the two (for example, Page_Load ). If Page developers want to use these events, they need to override these methods in the base class (for example, they need to rewrite Page. OnLoad for Page loading events, rather than using the Page_Load method ). If AutoEventWireup is disabled, the page will be slightly improved by leaving the event connection to the page author rather than automatically executing it.

Remove unused modules from the request processing pipeline

By default, all functions of nodes in the Machine. config file of the server computer are retained to active. Based on the features used by the application, you can remove unused modules from the request pipeline for a slight performance improvement. Check each module and its functions and customize it as needed. For example, if you do not use session Status and output cache in an application, you can remove them from the list so that requests do not perform other meaningful processing, you do not have to execute the code for entering and leaving each module.

Make sure to disable the debugging mode.

Remember to Disable debug mode before deploying production applications or performing any performance measurements. If the debug mode is enabled, improving ASP. NET performance may be greatly affected.

For applications that rely heavily on external resources, consider enabling network gardening on a multi-processor computer.

ASP. NET Process Model helps enable scalability on a multi-processor computer, distribute work to multiple processes (one CPU per worker), and each process sets the processor relationship to its CPU. This technology is called Web gardening. Enable Web gardening for your application if your application uses a slow database server or calls a COM Object with external dependencies (only two possibilities are mentioned here. However, before deciding to enable Web gardening, you should test how applications are executed in the Web garden. The above describes several methods to improve ASP. NET performance.

  1. SQL statements in ASP. NET
  2. Use StringBuilder in ASP. NET
  3. Response. Write in ASP. NET
  4. Analysis on ASP. NET authorization Module
  5. Processing Process for ASP. NET Runtime

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.