473,511 Members | 16,846 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
4 1692
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
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
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
:)

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2513
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...
1
1215
by: John | last post by:
Hi I have created custom membership/role/profile providers as per the web.config below. My questions are; 1. Have I defined them correctly? 2. How can I make the Login and Create User...
4
2224
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...
2
1225
by: Demetri | last post by:
I have several questions regarding the Membership and Roles mechanism in ASP.Net 2.0. 1. In the box, it comes with SqlMembershipProvider, which uses SQL Express 2005. What if I want it to use...
0
1794
by: GreggTB | last post by:
I have written two custom providers for our Oracle 9i database...a Membershp provider and a Role provider. I've been testing these over the last few days and they seem to be working well. However,...
1
3590
by: =?ISO-8859-1?Q?Carlos_Guzm=E1n_=C1lvarez?= | last post by:
Hello: I have custom Membership and Role providers for an ASP.NET application, the problem comes when the Authentication gets done ( and i'm using the Login control, it finished properly ) but...
0
1387
by: =?Utf-8?B?QV9SZXB1YmxpY2Fu?= | last post by:
This is a portion of my Web.config file: <system.web> <membership defaultProvider="SqlProvider"> <providers> <clear/> <add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider"...
2
1642
by: StinkyDuck | last post by:
Hello, I am relatively new to ASP.NET 2.0 and have been reading a book and going through some articles on the internet. When looking for information regarding membership and roles, I see lots...
4
8209
by: alexandis | last post by:
There are tons of articles about custom role and provider membership, but they just tear me apart and confuse :( The situation is following: I use DB2, so I wrote custom role + membership...
0
7242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7423
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7081
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7510
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5668
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1576
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
447
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.