Disable the Session
Disable session state when you are not using it. Not all web application require a session state and disabling it definitely improves performance.
To disable session state for a page in your application, use the following code:
<%@ page EnableSessionState="false" %>
If your page requires access to session variables only to read them then set the session state for this page to read only.
To set the session as read-only for a page in your application, use the following code:
<%@ page EnableSessionState="ReadOnly" %>
To disable session state for the entire application, open the 'web.config' file, and set the mode attribute to off under the session state section as in the following code:
<SessionState mode="off" />
Comments: tb@tbiro.com
|