SignInManager.PasswordSignInAsync Throwing Null Object Exception

As is usually my wont, the issue had nothing to do with the symptom. Of course SignInManager.PasswordSignInAsync isn't broken. It was my code that was broken. That makes this question moot, which begs me to delete the question.

There is, however, a lesson to be learned here. In my case it was the as keyword. Having abandoned EF, as mentioned in the edit, I had to supply implementations of several interfaces. One method I had to supply is GetRolesAsync, which returns Task<IList<String>> (in my case). I've never dealt with IList. Turns out as is what I needed. But I was trying to cast an IQueryable to an IList, which doesn't work. The result: as simply returns null. Thanks, as. That's useful.

Yeah. I'll probably delete this question.


Sometimes (especially if you update Microsoft.AspNet.Identity.Owin) you can forgot to add line

app.CreatePerOwinContext<ApplicationSignInManager>(ApplicationSignInManager.Create);

to method public void ConfigureAuth(IAppBuilder app) in App_Start\Startup.Auth.cs After including this everything should work.