Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using so many sessions in my project ..so i had dought that it causes any problem like slow processing etc....
Posted

That depends on what you are storing in session and what is the alternate method available to you to store that value.

sometimes instead of doing round trip to db server multiple times, its better to keep things in viewstate or in session variables.
However it should be kept in mind that session is stored on web server (inProc) and can slow down the performance if you store very heavy objects in that.
 
Share this answer
 
First of all,they may be accessing the data in the database too many times to pull the data which will affect performance.Further

Advantages :

-It helps to maintain user states and data to all over the application.
-It can easily be implemented and we can store any kind of object.
-Stores every client data separately.
-Session is secure and transparent from user.

Disadvantages :

-Performance overhead in case of large volume of user, because of session data stored in server memory.
-Overhead involved in serializing and De-Serializing session Data. because In case of StateServer and SQLServer session mode we need to -serialize the object before store.

You can refer to what are the advantages / disadvantages of using Session variables?
 
Share this answer
 
v2
Comments
Thanks7872 7-May-13 7:32am    
If someone ↓vote the answer,they should justify it.
Yes it may slow down your application performance, because it is stored in Server Memory.
Instead of storing in session try to store in Cookies in encrypted format.
 
Share this answer
 
Comments
ntitish 7-May-13 8:19am    
sir can u give some example....
Bikash Prakash Dash 7-May-13 8:31am    
sometime you will get session timeout error , although you can provide more value , for timeout .But this is not an effective way to use more session variables, try to use far as possible Cookies, QueryStrings.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900