Tuesday, March 13, 2012

thread restarting mid http request processing

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@dotnet.itags.org.discussions.microsoft.com> wrote in
message news:0BF0E8CC-8FDB-4FEC-8360-13F665C19CBC@dotnet.itags.org.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,
> _howardHi 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...
> > 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
>
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:
> > 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...
> > > 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

0 comments:

Post a Comment