467,923 Members | 1,260 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,923 developers. It's quick & easy.

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
  • viewed: 1307
Share:
3 Replies
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 this site, you agree to our Privacy Policy and Terms of Use.