Tuesday, July 9, 2013

Membership provider not found in separate class Library [Solved]

If you are trying to use a class library you'll have to Add reference System.Web and System.Web.ApplicationServices

Then Add a using directive to the System.Web.Security namespace in your class - this will give you direct access to the Membership class.
C#:
using System.Web.Security;
Example:
using System.Web.Security;

namespace ClassLibrary
{
    public class Class1 : MembershipProvider
    {
    }
}


Happy Programming :)