异常:对象引用未设置为对象的实例。
{System.NullReferenceException: Object reference not set to an instance of an object.
at System.Web.HttpContextExtensions.GetOwinEnvironment(HttpContext context)
at System.Web.HttpContextExtensions.GetOwinContext(HttpContext context)
答案 0 :(得分:1)
您没有实例化UserManager
,而是尝试将其用作static
类,而不是。{/ p>
使用new
关键字(how do I create an instance of UserManager
)。