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

Jos*_*rin 7 c# authentication reference claims-based-identity .net-4.5

我正在学习.NET 4.5中新的基于声明的身份验证方法,并且正在使用Console应用程序来完成此操作.根据MSDN 这里,ClaimsAuthenticationManager是System.Security.Claims命名空间中的一员.正如你在这里看到的,我没有得到这个选项.我确保该项目使用的是.NET 4.5.我在这里错过了一些简单的东西......有人有什么建议吗?

System.Security.Claims Intellisense选项

Ree*_*sey 14

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

您可以在以下文档中看到ClaimsAuthenticationManager:

命名空间:System.Security.Claims

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