I’m in the process of moving code out of App_Code into a class library.
I create users programmatically using Membership.CreateUser.
How can I continue to do this inside my class library where there’s no access to the membership provider I have configured in web.config?
Add a using directive to the
System.Web.Securitynamespace in your class – this will give you direct access to theMembershipclass.C#:
VB.NET: