In fact, you can get the basic required functionality without executing each method in MembershipProvider and RoleProvider
Just use throw new NotImplementedException();
as a body of properties / methods that you are not going to use.
My custom membership provider just provides real implementations for
bool ChangePassword(string username, string oldPassword, string newPassword)
MembershipUser GetUser(string username, bool userIsOnline)
bool ValidateUser(string username, string password)
and throw new NotImplementedException();
for others.
Similarly, my custom role provider simply implements
string[] GetRolesForUser(string username)
With this, I can use basic built-in authorization and authentication without much effort.
StanK
source share