Session data and database


https://forum.kartris.com/Topic2355.aspx
Print Topic | Close Window

By jonnymaboy - Mon 9 Sep 2013
hi,

Can you please help me out with the storing of sessions in the database. i cant find anything in the web.config about SessionState etc like:

sessionState mode="SQLServer"
InProc orOutProc


Also how is this all defined and implemented. i have gone through the code and to be honest am really struggling with how this works. Are you using a custom session provider? if so where is it in the code?

Thanks
By Medz - Tue 10 Sep 2013
We're not actually using a custom session provider but we have a custom session class object that is retrieved from the database. The object SessionCode and ID properties are then stored in separate Session variables. You can check "Session_Start" Sub in Global.asax to see how this works.



The SessionState is stored using .NET default - InProc. The process of switching it to SQLServer should be the same as to how you switch a standard ASP.NET web application. It shouldn't clash with any of the Kartris code as we're storing and retrieving session variables in the standard way.