Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: VB7
Expertise: beginner
Feb 10, 2003



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Disabling the session state to improve performances

Sessions management consumes server's resources and memory, thus, if you don't use them in your application, you should disable them to improve performances. You can disable sessions for the entire application by setting to False the mode attribute in the web.config's <sessionState> tag, as follows:

<sessionState mode="Off" />
If you generally need session variables, but have some pages that don't use them, you can disable session state just for those pages, by setting to False the EnableSessionState attribute in the @ Page directive, as shown below:

<%@ Page EnableSessionState ="False" …other attributes…%>
If you use session variables, but just in read mode, and don't need to write them, you can set the EnableSessionState attribute to ReadOnly. The performances will not be as good as with disabled sessions, but it will still be better than with enabled sessions.
Marco Bellinaso
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date