473,320 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

2.0 Custom Membership Provider!

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.");

}
Jan 6 '06 #1
3 4897
Isn't CreateUser() just the starting point? After that you use Profiles for
the rest.

Are you following the Access sample provider that you see on this page?

http://msdn.microsoft.com/asp.net/do...s/default.aspx

"Adam J Knight" <ad**********@optusnet.com.au> wrote in message
news:OU**************@TK2MSFTNGP09.phx.gbl...
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.");

}

Jan 6 '06 #2
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
Jan 6 '06 #3
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/
"Adam J Knight" <ad**********@optusnet.com.au> wrote in message
news:Os**************@TK2MSFTNGP14.phx.gbl...
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

Jan 6 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Graham | last post by:
I have created a custom MembershipProvider called "LassieMembershipProvider" that derives from "MembershipProvider". This providor is located in a Businesslogic layer dll called...
6
by: Shimon Sim | last post by:
Hi I am working on application that need to hold custom user information - Last and first name, email, some other domain related information. I used to create Base class for all my pages. The base...
2
by: WB | last post by:
Hi, I am revamping my company's website with ASP.Net 2.0. In order to use our existing user data in our SQL 2000, I have written a custom membership provider. However, when I try to logon with...
2
by: John | last post by:
Hi I was working fine with create user wizard and the default membership provider. I have now customised the membership provider as per attached web.config. The create user wizard picks up the...
4
by: techsupport | last post by:
I have some experience with .NET Remoting, as well as ASP.NET 2.0, and have been wanting to remote a custom membership and profile provider. I want to take advantage of the new controls in ASP.NET...
1
by: Axford | last post by:
Hello, I am trying to implement my own custom provider for memberships, basically only id/pwd (no roles). I use the new login web control (I am using asp.net 2.0 and VS2005). In web.config I...
0
by: Mwob | last post by:
Hi all, I'm about to start creating a custom membership provider. Its for a website that already has a table of users in a single table, so I need to create a custom MP to talk to the data in...
4
by: alexandis | last post by:
We have tables of logins (users), that differs much from standard microsoft structure - we don't use control question/answer, date fields, etc. But instead we have several additional fields. I...
3
by: Sunfire | last post by:
I need to use a custom database for all of the user membership and rolls. How do you do this?
6
by: Jonathan Wood | last post by:
Although this will be a challenge at my level of ASP.NET knowledge, I'm thinking I should implement my own membership provider class. Looking over the methods I must implement, a number of...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.