System.Security.Claims 命名空间的成员不可用? [英] A member of the System.Security.Claims namespace is not available?
问题描述
我正在 .NET 4.5 中学习新的基于声明的身份验证方法,并且正在使用控制台应用程序来执行此操作.根据 MSDN :
<块引用>命名空间:System.Security.Claims
程序集:System.IdentityModel(在 System.IdentityModel.dll 中)
I am learning the new Claims-based Authentication methods in .NET 4.5, and am using a Console app to do so. According to MSDN here, ClaimsAuthenticationManager is a member of System.Security.Claims namespace. As you can see here, I am not getting this option. I have made sure the project is using .NET 4.5. I am missing something simple here... anyone have any suggestions?
You need to add a reference to System.IdentityModel.dll
You can see this in the documentation for ClaimsAuthenticationManager
:
Namespace: System.Security.Claims
Assembly: System.IdentityModel (in System.IdentityModel.dll)
这篇关于System.Security.Claims 命名空间的成员不可用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!