【问题标题】:A member of the System.Security.Claims namespace is not available?System.Security.Claims 命名空间的成员不可用?
【发布时间】:2013-07-01 16:39:47
【问题描述】:

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

【问题讨论】:

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


    【解决方案1】:

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

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

    命名空间:System.Security.Claims

    程序集:System.IdentityModel(在 System.IdentityModel.dll 中)

    【讨论】:

    • 我不太确定我是怎么错过的……谢谢,里德!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多