Im trying to modify the loginsystem that auto-creates when you create a new mvc project on visual studio 2013 sp 3. When i register my user i go to
await SignInAsync(user, isPersisten:false);
Which goes to:
private async Task SignInAsync(User user, bool isPersistent)
{
AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
var identity = await UserManager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie);
AuthenticationManager.SignIn(new AuthenticationProperties() { IsPersistent = isPersistent }, identity);
}
Even though my user object is full with info and the ApplicationCookie = ApplicationCookie i still get NullReferenceException on UserManager.CreateIdentityAsync.