GetOwinContext没有在asp.net核心工作

问题描述 投票:9回答:1

它总是说的HttpContext不包括GetOwinContext的定义(),我尝试下载.NET核心owin,但我不知道如何实现相同的功能。该代码可以初级讲座在asp.net 5遵守。

private IAuthenticationManager AuthenticationManager
{
    get
    {                
        return HttpContext.GetOwinContext().Authentication;
    }
}
c# asp.net asp.net-core owin
1个回答
11
投票

没有GetOwinContext()为Asp.Net的核心。使用HttpContext.Authentication代替。

© www.soinside.com 2019 - 2024. All rights reserved.