asp.net mvc - Getting Null Exception at UserManager.GetRoles(Convert.ToInt32(userid)) -


exception: object reference not set instance of object.

  {system.nullreferenceexception: object reference not set instance of object. @ system.web.httpcontextextensions.getowinenvironment(httpcontext context) @ system.web.httpcontextextensions.getowincontext(httpcontext context) 

you did not instantiate usermanager, trying use static class not.

use new keyword (how create instance of usermanager).


Comments

Popular posts from this blog

c++ - What's the differece between of link to a dynamic file and as a input object? -

javascript - Feed FileReader from server side files -

Android Unit Testing / Mockito: android.location.Location not mocked -