c# - System.Security.Claims 命名空间的成员不可用?

标签 c# authentication reference .net-4.5 claims-based-identity

我正在学习 .NET 4.5 中新的基于声明的身份验证方法,并且正在使用控制台应用程序来执行此操作。根据 MSDN here , ClaimsAuthenticationManager 是 System.Security.Claims 命名空间的成员。正如您在这里看到的,我没有得到这个选项。我已确定该项目使用的是 .NET 4.5。我在这里遗漏了一些简单的东西……有人有什么建议吗?

System.Security.Claims Intellisense options

最佳答案

您需要添加对 System.IdentityModel.dll 的引用

您可以在 ClaimsAuthenticationManager 的文档中看到这一点:

Namespace: System.Security.Claims

Assembly: System.IdentityModel (in System.IdentityModel.dll)

关于c# - System.Security.Claims 命名空间的成员不可用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17409501/

相关文章:

c# - C# 和 C 中 volatile 的区别

c# - 在 C# 中验证 TreeView 拖/放操作的最佳方法

c++ - operator++(int) 重载抽象基类和 Wall

c# - visual studio 中的条件引用 - 如何定义自定义变量

c# - 如何在运行时将文件复制到虚拟路径

c# - 在不使用临时内存的情况下从列表中删除重复项

azure - AzCopy 身份验证

authentication - 发送用户 ID 和 access_token

java - Azure AD Spring Boot token 生成无效签名

c++ - 通过引用传递参数的指针算术