ASP.NET Identity - HttpContext has no extension method for GetOwinContext

后端 未结 10 1690
暗喜
暗喜 2020-12-04 05:04

I have downloaded, and successfully ran the ASP.NET Identity sample from here: https://github.com/rustd/AspnetIdentitySample

I am now in the middle of implementing t

10条回答
  •  情深已故
    2020-12-04 05:52

    After trial and error comparing the using statements of my controller and the Asp.Net Template controller

    using System.Web;
    

    Solved the problem for me. You are also going to need to add:

    using Microsoft.AspNet.Identity;
    using Microsoft.AspNet.Identity.Owin;
    

    To use GetUserManager method.

    Microsoft couldn't find a way to resolve this automatically with right click and resolve like other missing using statements?

提交回复
热议问题