gpt4 book ai didi

c# - 类库找不到 MembershipUser

转载 作者:可可西里 更新时间:2023-11-01 07:49:58 25 4
gpt4 key购买 nike

我已将类库项目添加到我的应用程序中。

在我的一个类中,我需要使用 MembershipUser 类,但项目找不到它。我添加了对 System.Web、System.Web.Security 和 System.Security.Principal 的引用。

我不确定是什么问题。有人遇到过这个吗?

最佳答案

如果您使用的是 .NET 4.0,则需要引用 System.Web.ApplicationServices.dll 程序集。一如既往的 MembershipUser 的文档包含所有必要的信息:

Namespace:  System.Web.Security
Assembly: System.Web.ApplicationServices (in System.Web.ApplicationServices.dll)

在以前版本的框架中 MembershipUser类位于 System.Web.dll 程序集中。

关于c# - 类库找不到 MembershipUser,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4708280/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com