gpt4 book ai didi

c# - 找不到 IAuthenticationManager 的对象引用

转载 作者:太空宇宙 更新时间:2023-11-03 10:25:13 24 4
gpt4 key购买 nike

我在我的 MVC 应用程序中遇到此错误

The type or namespace name 'IAuthenticationManager' could not be found (are you missing a using directive or an assembly reference?)

以下是我遇到错误的代码

private IAuthenticationManager AuthenticationManager
{
get
{
return HttpContext.GetOwinContext().Authentication;
}
}

最佳答案

添加对链接中显示的此 DLL 的引用:

https://msdn.microsoft.com/en-us/library/microsoft.owin.security.iauthenticationmanager(v=vs.113).aspx

它来自程序集Microsoft.Owin.dll

  1. Check your Nuget Package references if you installed through Nuget
  2. If not, install through Nuget package to get the assembly reference. The package name - Microsoft.Owin

关于c# - 找不到 IAuthenticationManager 的对象引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31849328/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com