DotNetOpenAuth.WebAPI
DotNetOpenAuth.WebAPI copied to clipboard
Don't use HttpContext.Current
Using HttpContext.Current is gennerally considered a bad thing for several reasons like mocking and testability.
The following has proven to be working as an alternative: https://gist.github.com/3194281
Oh, and I'd just like to add that using ThreadStatic values/properties (HttpContext.Current) in a async context sounds risky at best, though I'm also guessing that the CLR team has thought of this, and it might just work just as you'd expect it to. Something about async not necessarily meaning parallel...