Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Disabling the session state to improve performances

Total Hit ( 2709)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


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 tag, as follows:

Click here to copy the following block
<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:

Click here to copy the following block
<%@ 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.


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.