Using HttpContext Safely After Async in ASP.NET MVC Applications

added by Matt_TCF
4/25/2014 1:35:21 PM

0 Kicks, 216 Views

Another day, another Entity Framework (and ASP.NET MVC 5) async problem, and another solution for you! Actually, today I have two solutions for you! This time, I ran into a problem with HttpContext's Items collection losing my IoC container when execution resumed after an await. The fix is simple once you understand what's going on.