Reputation: 827
I'm trying to implement a customer ASP.NET Membership provider. I have no database yet, but I know I want one that's simple and accessible.
I know I don't want to use the generated tables because from what I've seen and understand, they are very convoluted and include many fields that I just won't need. I set up the default Membership provider and let it generate its own database/tables and it produced this:
All by itself. I don't want this mess as part of my database. So the natural solution? A custom membership provider. To do this, I know you need to inherit from System.Web.Security.MembershipProvider and setup web.config to the derived class that I create.
public class MessAround : System.Web.Security.MembershipProvider
{
public MessAround()
{
//
// TODO: Add constructor logic here
//
}
public override string ApplicationName
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public override bool ChangePassword(string username, string oldPassword,
string newPassword)
{
throw new NotImplementedException();
}
public override bool ChangePasswordQuestionAndAnswer(string username
, string password, string newPasswordQuestion, string newPasswordAnswer)
{
throw new NotImplementedException();
}
....ETC ETC ETC
My question is:
How do I integrate this class into a custom database schema?
How do I eliminate fields that I don't need?
How do I get this class to interact with my database tables?
WTF is going on? :P
Upvotes: 0
Views: 509
Reputation: 5808
First of all, The whole ASP.Net Membership is inbuilt functionality. So there is pros and cons comes as
Pros
Cons
Now I give the answer one by one.
How to Check whether Session is Expired or not in asp.net
Using session variable with ASP.Net membership provider
Upvotes: 1