How to... Devart.Data.Linq.DataContext in Web Sessions
Posted: Wed 27 Aug 2014 15:56
Hi,
this is probably badly placed as maybe not specific to PostgreSQL. But didn't find a better forum...
I develop a medium-complex ASP.NET Web forms application with DevExpress Web Forms on the UI side (doesn't matter I guess)
Currently I put my Devart.Data.Linq.DataContext's (I've usually two of them) into the session state. This works just perfect... mostly... Sometimes, however, if initial (with regard to the page's life cycle) operations take a little bit longer, or if there was some time of user in-activity, the access to the context(s) fail(s) (call A). If I reload the page again, it's working again (call B). Inside the page's init I call some context function.
So it seems the context was in some invalid state in call A, then probably restored and available in call B.
(1) Does this make any sense? Is there something like a 'sleeping context'?
(2) Regardless my specific problem, what is best practice for dealing with Context in the scope of Web Forms? Is it correct to store them in the session state?
(3) For the next time, what is the right forum for such issues?
Thx ia,
Ekki
this is probably badly placed as maybe not specific to PostgreSQL. But didn't find a better forum...
I develop a medium-complex ASP.NET Web forms application with DevExpress Web Forms on the UI side (doesn't matter I guess)
Currently I put my Devart.Data.Linq.DataContext's (I've usually two of them) into the session state. This works just perfect... mostly... Sometimes, however, if initial (with regard to the page's life cycle) operations take a little bit longer, or if there was some time of user in-activity, the access to the context(s) fail(s) (call A). If I reload the page again, it's working again (call B). Inside the page's init I call some context function.
So it seems the context was in some invalid state in call A, then probably restored and available in call B.
(1) Does this make any sense? Is there something like a 'sleeping context'?
(2) Regardless my specific problem, what is best practice for dealing with Context in the scope of Web Forms? Is it correct to store them in the session state?
(3) For the next time, what is the right forum for such issues?
Thx ia,
Ekki