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.dllassembly. As always the documentation of the MembershipUser contains all the necessary information:In previous versions of the framework the MembershipUser class was located in the
System.Web.dllassembly.