ASP.NET HttpContext is null in 4.6.1 sample project
问题 1) Create new MVC app targeting 4.6.1 (not core, using MSVS 2015 Update 3) 2) In the generated class ApplicationUser.cs add an assertion: public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser> manager) { HttpContext httpContext = HttpContext.Current; Debug.Assert(httpContext != null); // assertion fails // ... } 3) Run program in the debugger, login, the assertion fires. This workaround fixes the problem however I was told that HttpContext should be available