我已经在我的应用程序中添加了一个类库项目。
在我的一个类中,我需要使用MembershipUser类,但项目找不到它。我添加了对System.Web,System.Web.Security和System.Security.Principal的引用。
我不确定问题是什么。有没有人碰到这个?
答案 0 :(得分:40)
如果您使用的是.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
程序集中。