1

Related

Implementing Custom Membership Provider Membership User Issues

Extending a Custom Membership Provider

Question

  1. If i have different SQL table schema for Roles, Profiles should i create Custom Providers for each of these "Role","Membership" and "Profiles". I am definitely sure many users are unhappy with profile fields that default implementation provides. For example below Profile will require a different override of MembershipProvider.CreateUser because mine does not contain a security question, status etc.

table schema

FirstName
LastName
Initial
Address
Company
FacebookId
LastLogin
Community
  • 1
  • 1
Deeptechtons
  • 10,945
  • 27
  • 96
  • 178
  • possible duplicate of [Custom MembershipProvider in .NET 4.0](http://stackoverflow.com/questions/5701673/custom-membershipprovider-in-net-4-0) – balexandre Oct 28 '11 at 06:44
  • Custom membershipProvider did not change since 2.0, so it's the same as the question I mention. – balexandre Oct 28 '11 at 06:45
  • @balexandre god users here get carried away by reading the question Title. Could you read the bolded text under question headline?. The example u pointed too sticks to the profile fields defined. – Deeptechtons Oct 28 '11 at 06:59
  • 1
    if you read my answer that I point out on the other question entirely, you will have all your questions answered, soon you mention *Custom Provider* is up to you to provide the information, the provider only expects the object, it does not care how and where do you get the data from... *(btw: good, not God!)* – balexandre Oct 28 '11 at 07:10
  • @balexandre so does this mean i create my own implementations for those base providers since my schema has changed? – Deeptechtons Oct 28 '11 at 07:12
  • follow my instructions, create a new file, and implement the provider, use my web.config example code to point to your new provider, press F5 and see what do you need, what methods you need to fillup, like `GetUser`, `DeleteUser`, etc... don't customize any method that you don't use, just the ones you do. – balexandre Oct 28 '11 at 07:15

1 Answers1

1

You need to create your own Custom membership provider so you can have whatever you want, for that I would point to my own answer on how you can accomplish that

Custom MembershipProvider in .NET 4.0

Community
  • 1
  • 1
balexandre
  • 73,608
  • 45
  • 233
  • 342
  • i did read it through completely 'really', you advised not to implement them right?. I too agree. i will wait before marking this as answer – Deeptechtons Oct 28 '11 at 07:12
  • I did? from all that I wrote you read "don't implement them"? btw, where do I say that? – balexandre Oct 28 '11 at 07:16
  • `I only use some, not all as I don't really care about methods like ChangePasswordQuestionAndAnswer, DeleteUser, etc` that means you implement them but throw a not implemented exception right. – Deeptechtons Oct 28 '11 at 08:05
  • no matter what you throw ... if you don't use them, your code will never reach there. Did you at least saw the video I mention? Chris Pels did a good job explaining everything... – balexandre Oct 28 '11 at 08:09