System.Security.Claims 命名空间的成员不可用? [英] A member of the System.Security.Claims namespace is not available?

查看:20
本文介绍了System.Security.Claims 命名空间的成员不可用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 .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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆