2.0 Custom Membership Provider!

A

Adam J Knight

Hi all,

I am in the process of creating a custom membership provider (ASP.NET 2.0):

Currently I am inheriting from MembershipProvider which isn't a problem.

However, the membership.CreateUser() methods signature doesn't seem
relevant to my implementation.

For example, i will be needing to store a users address details and not just
their 'username' , 'password' and 'email'.
Also the password Question & Answers will not be used.

Is their someway i can adjust the CreateUser member signature?

Thoughts & help appreciated!!!

Cheers,
Adam
Current Code:

public override System.Web.Security.MembershipUser CreateUser(string
username, string password, string email, string passwordQuestion, string
passwordAnswer, bool isApproved, object providerUserKey, out
System.Web.Security.MembershipCreateStatus status)

{

throw new Exception("The method or operation is not implemented.");

}
 
A

Adam J Knight

Hi Ken,

Not sure how profiles relate to my current problem???

I am not following any of the samples you listed
Just not sure how to implement saving custom user ('member') info using a
custom membership provider.

In this instance a User('member') consists of the following attributes.

For eg:
- institution_id
- name
- phone
- alt_phone
- fax
- email
- website
- address
- suburb
- state / city
- post code
- contact_fname
- contact_lname
- user_name
- password
- user_nbr
- institution_type_id

The CreateUser method doesn't compensate for such alterations.

This is a tutorial i have refered to, but as mentioned .i am not customizing
the datasource, just what is stored.

http://www.devx.com/asp/Article/29256/0/page/1

Cheers,
Adam
 
C

clintonG

Hello Adam,

I have to do the same thing and the Profile object is in fact the 2.0 way to
record and retrieve a user's properties. AFIK this data is not normalized
and I can't see how it possibly could be but that's how it works performance
issues being kept mum so far. For example, one thing that concerns me at the
moment is it also seems that the object is populated with data each time the
user logs in whether the data is needed or not as the properties must be
defined in web.config.

Our alternative seems to be the reuse of the aspnet_Users primary key used
as a foreign key to table(s) of our own creation where we have to write the
CRUD code ourselves.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top