¡@

Home 

c# Programming Glossary: httpcontext.current.items

Are static class instances unique to a request or a server in ASP.NET?

http://stackoverflow.com/questions/194999/are-static-class-instances-unique-to-a-request-or-a-server-in-asp-net

were different which in this case was a bad thing. Using HttpContext.Current.Items solves my problem perfectly. For anyone who stumbles upon this.. GloballyAccessibleClass Instance get IDictionary items HttpContext.Current.Items if items.Contains TheInstance items TheInstance new GloballyAccessibleClass.. the same lifetime as a request I would suggest to use the HttpContext.Current.Items collection. This is by design meant to be a place to store stuff..

Problem passing ELMAH log id to Custom Error page in ASP.NET

http://stackoverflow.com/questions/2885487/problem-passing-elmah-log-id-to-custom-error-page-in-asp-net

args.Entry.Id this doesn't work either HttpContext.Current.Items StateKeys.ElmahLogId args.Entry.Id But on the Custom error page.. the Custom error page the session variable reference and HttpContext.Current.Items are giving me a NullReference exception. How can I pass the..

Capture username with log4net

http://stackoverflow.com/questions/4813242/capture-username-with-log4net

example at the link above to pull a specific item from the HttpContext.Current.Items or HttpContext.Current.Session collections. Something like namespace..

Caching Entity Framework DbContexts per request

http://stackoverflow.com/questions/6580757/caching-entity-framework-dbcontexts-per-request

to instantiate them I was caching a copy of them in HttpContext.Current.Items because it didn't feel right to have several copies of them..

Attaching and detaching entities from context correctly in EF4.1

http://stackoverflow.com/questions/7678665/attaching-and-detaching-entities-from-context-correctly-in-ef4-1

private static DbContext context get return DbContext HttpContext.Current.Items ObjectKeys.ContextRequestItemKey private static void Detach..