Can't find Request.GetOwinContext

后端 未结 13 1264
北荒
北荒 2020-12-04 22:47

I have been searching for an hour trying to figure out why this isn\'t working.

I have a ASP.Net MVC 5 application with a WebAPI. I am trying to get Request.GetOwin

13条回答
  •  一向
    一向 (楼主)
    2020-12-04 23:49

    In my case I need to add

    using Microsoft.AspNet.Identity.Owin;
    

    for resolving GetOwinContext and then GetUserManager in following line.

    Request.GetOwinContext().GetUserManager();
    

提交回复
热议问题