开发者

Class library can't find MembershipUser

开发者 https://www.devze.com 2023-02-05 12:14 出处:网络
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.S

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

精彩评论

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