我已经在我的应用程序中添加了一个类库项目。
在我的一个类中,我需要使用MembershipUser类,但项目找不到它。我添加了对System.Web、System.Web.Security和System.Security.Principal的引用。
我不确定问题出在哪里。有没有人碰到过这个?
发布于 2011-01-17 05:48:24
如果您使用的是.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程序集中。
https://stackoverflow.com/questions/4708280
复制相似问题