Header Ads

Increase ASP.NET Page Performance


I suggest following ways to increase ASP.Net Pages.Suppose your application does not use session state disable web config file as follows:

<%@ Page EnableSessionState="ReadOnly" . . .%>
Page requests using session state internally use a ReaderWriterLock to manage access to the session state. For pages that only read session data, consider setting EnableSessionState to ReadOnly.

Avoid unnecessary round trips to the server

If you develop custom server controls, consider designing them to render client script for some of their functionality

Use the Page object's IsPostBack property to avoid unnecessary processing

Leave buffering on unless you have a specific reason to turn it off

Use the Transfer method of the Server object or use cross-page posting to redirect between ASP.NET pages in the same application

Use cache api as much as possible it will decrease your server roundtrip and boost application performance. ASP.NET 2.0 or higher version provides functionality called sqlcachedependancy for your database caching

Use Page.IsPostBack to minimize redundant processing.

Ensure debug is set to false.

Consider using Server.Transfer instead of Response.Redirect.

Use client-side validation.

Avoid creating deep hierarchies of controls.

Avoid using Page.DataBind.

Minimize calls to DataBinder.Eval.

Separate dynamic data from static data in your pages.

Use VaryBy attributes for selective caching.

Store simple state on the client where possible.

Use static properties instead of the Application object to store application state.

Use the ReadOnly attribute when you can.

Minimize the number of objects you store in view state.

Use Response.Write for formatting output.

Use StringBuilder for temporary buffers.

Use HtmlTextWriter when building custom controls.

Use a DataReader for fast and efficient data binding.

Prevent users from requesting too much data.

Turn off authentication for anonymous access.

Tune SSL timeout to avoid SSL session expiration.

Ensure content updates do not cause additional assemblies to be loaded.

Consider using HTTP compression.
Powered by Blogger.