它总是说HttpContext不包含GetOwinContext()的定义,我尝试下载.net核心owin但我不知道如何实现相同的功能.
下面的代码可以在asp.net 5中编译.
下面的代码可以在asp.net 5中编译.
private IAuthenticationManager AuthenticationManager { get { return HttpContext.GetOwinContext().Authentication; } }
解决方法
Asp.Net核心没有GetOwinContext().请改用HttpContext.Authentication.