首页 > 解决方案 > IAuthenticationManager 不包含 GetExternalLoginInfoAsync 的定义,如何解决此问题?

问题描述

我有这个方法,我得到了这行错误,请帮助我。

public async Task<ActionResult> ExternalLoginCallback(string returnUrl) {
var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();//IAuthenticationManager does not contain definition of GetExternalLoginInfoAsync. Are you missing some assembly?
}
 private IAuthenticationManager AuthenticationManager
        {
            get
            {
                return HttpContext.GetOwinContext().Authentication;// HttpContext does not contain a definition of GetOwinContext. are you missing some assembly or directive.
            }
        }

NB:// 对于 GetOwinContext,我按照此链接安装软件包,错误现在消失了,但我仍然留下 GetExternalLoginInfoAsync 的错误。 https://www.codeproject.com/Questions/5255999/Httpcontextbase-does-not-contain-a-definition-for

标签: asp.net-mvc

解决方案


推荐阅读