I think you're getting confused with HttpHandlers. There is a member of the IHttpHandler interface called IsResulable which says:
" Gets a value indicating whether another request can use the System.Web.IHttpHandler instance. " I believe that each request gets its own HttpModule. That's why HttpApplication is passed into the Init function. Every request has its own context. If I put something into request1's context, I don't have access to that item from request2. --- "Hart, Leo" <[EMAIL PROTECTED]> wrote: > Oh, I get it now! The "MyAuthenticateRequest" name woke me up. > Thanks! > > A question: what happens in the following situation: > > There are two requests on the same thread. > > Request1 starts > log4net.MDC.Set("sessionID", mContext.Session().SessionID) is > called in my HttpModule > Some logging for Request1 occurs > Request2 starts > log4net.MDC.Set("sessionID", mContext.Session().SessionID) is > called in my HttpModule > Some logging for Request2 occurs > Some logging for Request1 occurs > Request1 ends > Request2 ends > > Once that second MDC.Set is called, won't all of my logging for > Request1 > be written with Request2's sessionID? Since a web app is > multi-threaded, I cannot guarantee that Request1 will finish before > Request2 application, can I?