它总是说HttpContext不包含GetOwinContext()的定义,我尝试下载.net core owin,但我不知道如何实现相同的功能。 下面的代码可以在asp.net 5中编译。
private IAuthenticationManager AuthenticationManager
{
get
{
return HttpContext.GetOwinContext().Authentication;
}
}
最佳答案
Asp.Net core 没有 GetOwinContext()
。请改用 HttpContext.Authentication
。
关于c# - GetOwinContext 在 ASP.NET Core 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39032627/