Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language

Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Asp.Net Programming

thread httpContext

If I launch a thread within an asp.net application.  Is their anyway to get
at the base threads HttpContext object.

If the thread errors I want to capture stuff like:

Hi Chuck,

Regarding on the thread HttpContext issue you mentioned, do you mean you
want to access the HttpContext in a thread you manually started through

Based on my understanding, the HttpContext object is only associated with
those ASP.NET worker threads(pickup from thread pool when a request
coming). For those custom thread you start through Thread.Start, they're
not associated with a HttpContext object automatically.  Would you provide
some further info about how to will spawn those custom threads and what
you'll do in it?  Anyway, since custom thread's execution lifecycle may
beyound an ASP.NET request's server-side processing lifecycle, it is not
recommended(also unsafe) to use Httpcontext objects(like Request, Response)
in custom thread's code. If what you want to pass some unchanged
data/parameters, you can consider direclty pass them as Thread's input
parameters(State data) at startup time.


Steven Cheng

Microsoft MSDN Online Support Lead


Get notification to my posts through email? Please refer to

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at


This posting is provided "AS IS" with no warranties, and confers no rights.

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc