Can't find Request.GetOwinContext

后端 未结 13 1260
北荒
北荒 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条回答
  •  萌比男神i
    2020-12-04 23:48

    In WEB API, you can get the reference using the following:

    HttpContext.Current.GetOwinContext().GetUserManager();
    

    it works in Identity 2.0

提交回复
热议问题