DbContextScope icon indicating copy to clipboard operation
DbContextScope copied to clipboard

asp.net thread agility

Open sdafonte opened this issue 11 years ago • 1 comments

Might we have problems using callcontext in asp.net / wcf applications ? Wouldn't it be better if you use HttpContext.Current.Items / OperationContext.Current.Extensions for asp.net / wcf ?

sdafonte avatar Dec 05 '14 01:12 sdafonte

From what I've found now, and it wasn't as much as I had wished for, this will not work in ASP.NET applications. HttpContext.Current seems to flow in a different way, manually managed by ASP.NET, not with the ExecutionContext like this. There doesn't seem to be an easy way to support both environments, and storing data in HttpContext.Current.Items adds the System.Web reference to your application.

So if you're writing web applications, you should better not use this library.

This information does not apply to ASP.NET 5. I haven't found any information about that yet.

ygoe avatar Sep 08 '15 11:09 ygoe