By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,730 Members | 1,133 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,730 IT Pros & Developers. It's quick & easy.

I feel it makes sense NOT to use custom membership & role providers

P: n/a
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 expanded membership class and it works for logging in, but going
further - creating user - I must make following in CreateUserWizard
template:

1) create 'users' record filling standard microsoft fields and ignore
those I don't use (mentioned above), i.e. put nulls, "", mindate,
etc...
2) update this record, initializing it with MY fields

So, one db operation operation is splitted. It looks ugly...

Concerning role provider: they offer user2role with userName and
roleName fields! But in this case I don't have relationship between
tables, because userName is not a primary key in users table (ID is,
but ID is integer).

I've decided to make custom login control and NOT to use custom
membership provider and role provider.

I ~hope~ it's correct decision. But I'd like to hear objections, until
it's too late :) and good article about further process... maybe there
is one from the person who took the same decision. Is there much work
to go without standard login control and provider? Would it be good to
have classes similar to the one I've already made as custom providers?
Maybe I could just change them and adopt for use as NOT provider-
classes?

Nov 7 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Whatever "floats your boat". Sometimes if you already have a custom setup
that doesn't lend well to the existing providers, it may be better to roll
your own.
-- Peter
http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"al*******@gmail.com" wrote:
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 expanded membership class and it works for logging in, but going
further - creating user - I must make following in CreateUserWizard
template:

1) create 'users' record filling standard microsoft fields and ignore
those I don't use (mentioned above), i.e. put nulls, "", mindate,
etc...
2) update this record, initializing it with MY fields

So, one db operation operation is splitted. It looks ugly...

Concerning role provider: they offer user2role with userName and
roleName fields! But in this case I don't have relationship between
tables, because userName is not a primary key in users table (ID is,
but ID is integer).

I've decided to make custom login control and NOT to use custom
membership provider and role provider.

I ~hope~ it's correct decision. But I'd like to hear objections, until
it's too late :) and good article about further process... maybe there
is one from the person who took the same decision. Is there much work
to go without standard login control and provider? Would it be good to
have classes similar to the one I've already made as custom providers?
Maybe I could just change them and adopt for use as NOT provider-
classes?

Nov 7 '07 #2

P: n/a
I've met similar discussion about all this:

http://groups.google.com.ua/group/mi...faf3ad1c4434ad

and met interesting idea about using providerUserKey field :)

Maybe someone offer another approaches also?

Please, don't offer 'profile' stuff again.

Nov 9 '07 #3

P: n/a
I wonder why Microsoft just hadn't created one more abstraction layer
for the structure of 'users' table?
Like many of their products, they simply don't have to. They make things
'good enough to sell' but not necessarily 'good enough to use in a pragmatic
fashion'.

I think the membership provider thing is a great idea. I still don't get it.
Mainly because there's some fundamental concepts that I just haven't found a
comprehensive description of yet.

For now, I've reverted back to my own login system (which, admittedly, for
most of my sites, is all I really need) but hope to fight the Membership
Provider again some long weekend when I have nothing else to do.

-Darrel
Nov 9 '07 #4

P: n/a
:)

I decided to stick to provider, the only problem was 'providerUserKey'
- i still can't see elegant way to assign value to it

I wonder - why Microsoft put it as INPUT parameter into CreateUser
method with NO WAY to initialize it manually

So i see 2 ways:
1) easier, but not elegant at all - create session variable and use it
to keep extrafield info: initialize it in CreatingUser and read it
inside CreateUser - so providerUserKey parameter is just left
behind...
2) to make extra property for keeping these extra fields in extended
membershipprovider class. Since this class is a singletone, it should
keep a LIST of objects, where every list item corresponds to specific
userid (login id). So, we assign extrafield info to such object in
CreatingUser and read it inside CreateUser: the same idea as in method
1

Nov 14 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.