0

I am seeing an intermittent issue that we cannot reliably reproduce in ASP.NET Identity (MVC 5.2.3).

The top of the stack trace suggests the issue is occurring on retrieving the password hash from the database:

System.NullReferenceException: Object reference not set to an instance of an object.
    at Portal.Web.Identity.IdentityStorageContext.<>c.<get_PasswordHash>b__6_0()
    at System.Threading.Tasks.Task`1.InnerInvoke()
    at System.Threading.Tasks.Task.Execute()

SQL server isn't logging any errors. Trying the action again succeeds. We have noticed it occuring on both live and pre-prod.

IdentityStorageContext.cs extract:

public Task<string> PasswordHash
{
     get { return Task<string>.Factory.StartNew(() => identityUser.PasswordHash); }
}

Any ideas?

m.edmondson
  • 30,382
  • 27
  • 123
  • 206

0 Answers0