System.Web.Security不';不存在于程序集中

System.Web.Security不';不存在于程序集中,security,membership-provider,visual-studio-2013,Security,Membership Provider,Visual Studio 2013,要么我参加晚会迟到了,要么我做错了什么。我正在使用Visual Studio 2013,但我尝试使用会员类,使用System.Web.Security命名空间在我的程序集中不存在 我能做些什么来解决这个问题 注意:System.Web存在 目标:.NET Framework 4.5.1System.dll中存在System.Web命名空间 System.Web.dll中存在System.Web.Security命名空间 您可以通过转到和名称空间,打开其中一个类,并检查msdn文章中所述的dll(

要么我参加晚会迟到了,要么我做错了什么。我正在使用Visual Studio 2013,但我尝试使用会员类,
使用System.Web.Security命名空间在我的程序集中不存在

我能做些什么来解决这个问题

注意:
System.Web
存在


目标:.NET Framework 4.5.1System.dll中存在System.Web命名空间

System.Web.dll中存在System.Web.Security命名空间


您可以通过转到和名称空间,打开其中一个类,并检查msdn文章中所述的dll(列为程序集)来检查这一点。

实际上,在.Net Framework 4+中,名称空间
System.Web.Security
位于
System.Web.ApplicationServices
程序集中,在参考资料中寻找那个

  • 将目标框架从.net客户端配置文件**更改为**.net

  • 添加
    System.Web
    assembly by references-->右键单击-->添加引用-->.net

  • 在顶部添加
    使用System.Web.Security


  • 我猜我要迟到了,但如果有人没有答案,我最终在这里找到了答案:

    添加对:WebMatrix.WebData的引用(您需要选择“扩展”) 您将拥有可用的Web安全性


    注意:您仍然需要(System.Web.Security)作为MemberShipUser和MemberShipUser

    的成员身份。看起来System.Web.Security命名空间位于System.Web.dll中。你有那个dll吗?我读过msdn,我知道它存在于
    System.Web.Security
    中。还是不走运。还请注意,我的目标是:.NET Framework 4.5.1而不是4.5如果目标是4.5,它能工作吗?这对我有用。。。你确定添加了System.Web.dll作为对该项目的引用吗?不,我在4.5中也没有看到。您是否正在Visual Studio 2013中测试此功能?是否有其他方法可以安装此库?命名空间:
    System.Web.Security
    Assembly:
    System.Web
    (在System.Web.dll中)@KomengeMwandila:不幸的是,我正在测试2012。如果这真的很重要,我可以开车上班(大约1英里)。我的作品有一个2013安装版本。+1,类MembershipProvider存在于System.Web.ApplicationServices程序集中的System.Web.security命名空间下。根据