开发者

Class library can't find MembershipUser

I've added a class library project to my application.

In one of my classes, I need to use the MembershipUser class, but the project can't find it. I've added references to System.Web, System.Web.Security, and System.Security.Principal.

I'm开发者_运维技巧 not sure what the problem is. Has anyone run into this?


If you are using .NET 4.0 you need to reference the System.Web.ApplicationServices.dll assembly. As always the documentation of the MembershipUser contains all the necessary information:

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

In previous versions of the framework the MembershipUser class was located in the System.Web.dll assembly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜