471,089 Members | 1,296 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Membership when more info is needed for a User

I use SQL Server Membership provider and my data are also stored in SQL
Server. But the default user fields are not enough for my users info. So I
created another Users table apart from aspnet_Membership. It has a
PK(uniqueidentifier) to create the reference to aspnet_Membership table and
my other info columns.
Having read about the Custom Membership Provider in .NET help, it says that
I should create a new object inherited from MembershipProvider and rewrite
all of its methods so it can be used by the membership system calls.
The question is:
Why not inherit from SQLMembershipProvider instead of MembershipProvider?
That way, most of the methods are already implemented and the only thing I
would do is to override the CreateUser, UpdateUser, GetUser methods, that is,
only a few
.. In the 1st line of the overriden methods, I could use Mybase.CreateUser,
Mybase.UpdateUser and so on, and just add the rest of the stuff I want to do
to deal with my extra info.
Am i in the right direction? I'd like a comment.

TIA
Iordanis
Jul 16 '08 #1
3 1378
You should look first at the Profile to see if its enough to help you.
http://odetocode.com/Articles/440.aspx
If you're using SqlServer, you ~can~ inherit from
SQLMembershipProvider.

Not everyone uses sql server obviously.

"Savvoulidis Iordanis" <Sa*****************@discussions.microsoft.comwrot e
in message news:E4**********************************@microsof t.com...
>I use SQL Server Membership provider and my data are also stored in SQL
Server. But the default user fields are not enough for my users info. So I
created another Users table apart from aspnet_Membership. It has a
PK(uniqueidentifier) to create the reference to aspnet_Membership table
and
my other info columns.
Having read about the Custom Membership Provider in .NET help, it says
that
I should create a new object inherited from MembershipProvider and rewrite
all of its methods so it can be used by the membership system calls.
The question is:
Why not inherit from SQLMembershipProvider instead of MembershipProvider?
That way, most of the methods are already implemented and the only thing I
would do is to override the CreateUser, UpdateUser, GetUser methods, that
is,
only a few
. In the 1st line of the overriden methods, I could use Mybase.CreateUser,
Mybase.UpdateUser and so on, and just add the rest of the stuff I want to
do
to deal with my extra info.
Am i in the right direction? I'd like a comment.

TIA
Iordanis

Jul 16 '08 #2
It doesn't. Only users with specific roles need to store extra info
Jul 16 '08 #3
The use of the MembershipProvider is tightly integrated with Roles. You want
to look at the Profile Table Provider ScottGu released after the Provider
model intially released was found to be FUBAR.

"Savvoulidis Iordanis" <Sa*****************@discussions.microsoft.comwrot e
in message news:97**********************************@microsof t.com...
It doesn't. Only users with specific roles need to store extra info
Jul 17 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by John | last post: by
9 posts views Thread by Paul Keegstra | last post: by
2 posts views Thread by John | last post: by
6 posts views Thread by Jonathan Wood | last post: by
3 posts views Thread by dm3281 | last post: by

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.