Click here to Skip to main content
15,893,401 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
I want to ask when i log in , i want to retain user infomation to use in all application . Now, i am using Session. Is it good ? Is there any better solution ?
Posted

1 solution

Yes you can use Session to store the values, but the way you use Session In which mode is what matters. Donot use session to store more values..if you are using repository pattern, there is a better way to use session.
You should try and use SqlServer state for session in case you want to store values and use throughout the application.
SQL
SQLServer mode stores session state in a SQL Server database. This ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers in a Web farm.

Definition from Msdn.
Hope this helps..
Post back your comments with queries if any..
 
Share this answer
 
Comments
baotdinh 17-Oct-14 21:09pm    
Thank you . I will research it.

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