I've seen an email from Piers Williams in december asking about this.
Basically - in an ASP.NET application - none of the existing contexts
are "safe" to use.
I'd like to remedy this. There are two ways forward that I can see.
1. Add a new WebContext class.
2. Change the ThreadLogicalContext cla
Yep - Thats the email I was talking about.
Thanks for the reply.
j.
Ron Grabowski <[EMAIL PROTECTED]> wrote:
> I don't think HttpContext is always available...especially inside the
> Global.asax.cs methods and/or inside CacheItemRemovedCallback methods.
HttpContext is available during the life cycle of a Http request. This
includes any event handler in Global.asax
On 2/16/06, Aaron Morton <[EMAIL PROTECTED]> wrote:
> Perhaps you could create something similar (add objects to the
> GlobalContext) to read values from the HTTPContext as a work around.
Nice - Ok - for the two things I've mentioned so far (User Identity
and Requested Url) this would be a fine s
On 2/16/06, GlennDoten <[EMAIL PROTECTED]> wrote:
> Josh, why bother with a flag called isWeb? If HttpContext.Current is not
> null then you know you are in the context of a web app; otherwise you
> aren't. It works great just checking the HTTP context because then the same
> code can execute in a
Uh - at the risk of mentioning something that everyone already knows:
> RegexEncode(Path.GetFileNameWithoutExtension(baseFileName))
Regex.Escape(string str)
Could be what you are looking for.