Tuesday, March 13, 2012

thread restarting mid http request processing

I'm experiencing a really strange error at the moment, and was wondering if
anyone else has run into this.
This is a seemingly straightforward asp.net application -- i'm allowing the
user to make choices on a web form, collect the information, populate my
domain model, and then persist the domain model into session state which is
using the out of proc asp.net session state service.
The user behavior is that on a seemingly random interval, changes are simply
not persisted. Looking at the debugger, I can see that when this happens, m
y
thread responsible for processing the request is shut down and the request i
s
picked up by a new thread -- but apparently without the context of the
previous thread -- hence the data not being persisted.
Does anyone have any thoughts on why this is happening and how to go about
correcting?
tia,
_howardasp.net is thread agile, so switching threads is common. are you using any
STA components (vb6)? they will have this behavior in the agile model.
-- bruce (sqlwork.com)
"howard dierking" <howard dierking@.discussions.microsoft.com> wrote in
message news:0BF0E8CC-8FDB-4FEC-8360-13F665C19CBC@.microsoft.com...
> I'm experiencing a really strange error at the moment, and was wondering
if
> anyone else has run into this.
> This is a seemingly straightforward asp.net application -- i'm allowing
the
> user to make choices on a web form, collect the information, populate my
> domain model, and then persist the domain model into session state which
is
> using the out of proc asp.net session state service.
> The user behavior is that on a seemingly random interval, changes are
simply
> not persisted. Looking at the debugger, I can see that when this happens,
my
> thread responsible for processing the request is shut down and the request
is
> picked up by a new thread -- but apparently without the context of the
> previous thread -- hence the data not being persisted.
> Does anyone have any thoughts on why this is happening and how to go about
> correcting?
> tia,
> _howard
Hi Bruce,
no STA components - all asp.net
_howard
"bruce barker" wrote:

> asp.net is thread agile, so switching threads is common. are you using any
> STA components (vb6)? they will have this behavior in the agile model.
> -- bruce (sqlwork.com)
>
> "howard dierking" <howard dierking@.discussions.microsoft.com> wrote in
> message news:0BF0E8CC-8FDB-4FEC-8360-13F665C19CBC@.microsoft.com...
> if
> the
> is
> simply
> my
> is
>
>
are you using thread local storage? it will have the same problem. how are
you storing the model data? also when do you update the session?
-- bruce (sqlwork.com)
"howard dierking" <howarddierking@.discussions.microsoft.com> wrote in
message news:9D21988F-C431-4D66-B1BC-0959F9DB033A@.microsoft.com...
> Hi Bruce,
> no STA components - all asp.net
> _howard
>
> "bruce barker" wrote:
>
any
wondering
allowing
my
which
happens,
request
about
no explicit tls model data is stored as an actual session variable, so the
timing of it's persistance will be set by the normal control life cycle.
_howard
"bruce barker" wrote:

> are you using thread local storage? it will have the same problem. how are
> you storing the model data? also when do you update the session?
> -- bruce (sqlwork.com)
>
> "howard dierking" <howarddierking@.discussions.microsoft.com> wrote in
> message news:9D21988F-C431-4D66-B1BC-0959F9DB033A@.microsoft.com...
> any
> wondering
> allowing
> my
> which
> happens,
> request
> about
>
>

0 comments:

Post a Comment