Optimize the web server computer and the configuration file for a specific application to meet your specific needs.

xiaoxiao2021-03-06  84

By default, the ASP.NET configuration is set to enable the most extensive features and to adapt to the most common solutions. Therefore, application developers can optimize and change certain configurations in the functions used by the application to improve the performance of the application. The following list is some options you should consider.

Enable authentication only for applications. By default, the authentication mode is Windows, or integrated NTLM. In most cases, for applications that require authentication, it is best to disable authentication in a Machine.config file and enable authentication in the web.config file.

Configure the application based on appropriate requests and response coding settings. ASP.NET default encoding format is UTF-8. If your application is strictly ASCII, configure an application to use ASCII to get a slight performance improvement.

Consider disabling AutoEventwireup for applications. Set the AutoeventWireUp property to false in the Machine.config file, meaning that the page does not match the method name and the events (for example, Page_Load). If the page developer wants to use these events, you need to rewrite these methods in the base class (for example, to override page.onLoad, instead of using the Page_Load method). If you disable autoeventwireup, the page will receive a slight performance boost by leaving the event connection to the page author instead of it.

Remove the unused module from the request processing line. By default, all functions of the node in the machine computer's Machine.config file are reserved as activation. Depending on the feature used by the application, you can remove unused modules from the request line to get a slight performance increase. Check each module and its features and customize it according to your needs.

For example, if you don't use a session status and output cache in your application, you can remove them from the list so that you don't have to perform the entry and leaving code of each module when you do not perform other meaningful processes. .

转载请注明原文地址:https://www.9cbs.com/read-101627.html

New Post(0)