M
Mark
Hi - I am regularly losing session information, I think due to the
worker process recycling. I have been traditionally using InProc
procedures, and using them like:
Session("username")=objDR("username") 'read from database
...and then simply referencing this on any other pages code behind, as:
if Session("username")=.....
If the proces recycles while a customer is browsing, I lose all their
information (sort of web cart), they have chosen so far.
So, will changing to SQLServer state stop this?
Can I use SQLServer state with MSDE?
Do I have to make any fundamental changes to the way I read and declare
session variables? (ie. I keep hearing about serialization - does this
change the way I use the sessions, as above)?
I am using a single web server (MS 2003 Web Edition), with MSDE, and
512MB Ram.
I've changed a local version of my app, to use SQLServer State (please
see my local web.config below) - and it APPEARS to work ok, but because
I've made no change to the way I use the sessions, are they still using
the old way of working - ie. are the sessions still being stored in the
web server memory?
Sorry for my ignorance, but I really want to learn best practice.
Thanks, Mark
Web.config:
<sessionState mode="SQLServer" sqlConnectionString="data
source=127.0.0.1;user id='sa';password=''" cookieless="false"
timeout="20"
/>
worker process recycling. I have been traditionally using InProc
procedures, and using them like:
Session("username")=objDR("username") 'read from database
...and then simply referencing this on any other pages code behind, as:
if Session("username")=.....
If the proces recycles while a customer is browsing, I lose all their
information (sort of web cart), they have chosen so far.
So, will changing to SQLServer state stop this?
Can I use SQLServer state with MSDE?
Do I have to make any fundamental changes to the way I read and declare
session variables? (ie. I keep hearing about serialization - does this
change the way I use the sessions, as above)?
I am using a single web server (MS 2003 Web Edition), with MSDE, and
512MB Ram.
I've changed a local version of my app, to use SQLServer State (please
see my local web.config below) - and it APPEARS to work ok, but because
I've made no change to the way I use the sessions, are they still using
the old way of working - ie. are the sessions still being stored in the
web server memory?
Sorry for my ignorance, but I really want to learn best practice.
Thanks, Mark
Web.config:
<sessionState mode="SQLServer" sqlConnectionString="data
source=127.0.0.1;user id='sa';password=''" cookieless="false"
timeout="20"
/>