Can I access IIdentity from Web API

后端 未结 4 1958
有刺的猬
有刺的猬 2020-12-25 09:45

I\'m adding some Web API services to an existing MVC application. I have a model binder for my MVC controllers to get the user object stored in a CustomIdentity. I\'m tryi

4条回答
  •  梦谈多话
    2020-12-25 10:43

    They removed GetUserPrincipal in ASP.NET MVC 4 RC. However it seems the ApiController property User has replaced this: http://msdn.microsoft.com/en-us/library/system.web.http.apicontroller.user

提交回复
热议问题