asp.net-mvc - 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
解决方案
推荐阅读
- c# - WCF 服务无法访问 SQL Server 数据库,而控制台项目可以
- typescript - 打字稿:类返回编号而不是对象实例
- sharepoint - 如果我拥有的 id 是 onedrive/sharepoint 的文件或文件夹,是否有任何休息端点可以找到?
- devops - 带有 Lets Encrypt SSL 的 nginx 入口控制器
- python - Visual Studio 中的 Discord 和 Python 问题
- swift - 存储类型到函数参数
- angular - 如何在角度形式中使用primeng自动完成(如何在形式JSON中使用completeMethod事件)
- git - 有没有办法将多个测试分支名称与 AWS ALB 目标组联系起来?
- linux - 如何为 Linux (Arch) 手动安装旧版本的 unity (2019)
- scala - Akka Stream 源队列:如何限制在具有背压的队列中的插入(来自可遍历的接口)