473,408 Members | 2,052 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,408 software developers and data experts.

ASP.NET 2.0 Membership

Hi all

I am using the membership provider and am storing all the login details
via this system.

However, I require to add additional fields that may change over time
that are related to the User. E.g. DOB, Place of birth and all that.

What is the best way to do this? Create a second table taking the
primary key of the aspnet_Users table and use this as a foreign key in
my new table?

Can I extend the provider to take these new fields? If so, how do I
change it in case of new fields?

Regards
Ray
May 2 '06 #1
10 1780
Try using profiles. They are a built in extension for the membership
provider.

--

Riki

"Ray Booysen" <rj***********@rjb.za.net> wrote in message
news:e6*************@TK2MSFTNGP05.phx.gbl...
Hi all

I am using the membership provider and am storing all the login details
via this system.

However, I require to add additional fields that may change over time that
are related to the User. E.g. DOB, Place of birth and all that.

What is the best way to do this? Create a second table taking the primary
key of the aspnet_Users table and use this as a foreign key in my new
table?

Can I extend the provider to take these new fields? If so, how do I
change it in case of new fields?

Regards
Ray

May 2 '06 #2
Thanks, I'll take a look!

Regards
Ray

Riki wrote:
Try using profiles. They are a built in extension for the membership
provider.

--

Riki

"Ray Booysen" <rj***********@rjb.za.net> wrote in message
news:e6*************@TK2MSFTNGP05.phx.gbl...
Hi all

I am using the membership provider and am storing all the login details
via this system.

However, I require to add additional fields that may change over time that
are related to the User. E.g. DOB, Place of birth and all that.

What is the best way to do this? Create a second table taking the primary
key of the aspnet_Users table and use this as a foreign key in my new
table?

Can I extend the provider to take these new fields? If so, how do I
change it in case of new fields?

Regards
Ray


May 2 '06 #3
On Tue, 02 May 2006 10:59:33 +0100, Ray Booysen wrote:
However, I require to add additional fields that may change over time
that are related to the User. E.g. DOB, Place of birth and all that.
No, that's not what membership is about. Membership is not a full user
store, it's merely a way to verify authentic users.
What is the best way to do this? Create a second table taking the
primary key of the aspnet_Users table and use this as a foreign key in
my new table?
Yes, that's a good solution.
Can I extend the provider to take these new fields? If so, how do I
change it in case of new fields?


No, Like I said, Membership is not a general data store. You should write
your own routines to access this data seperately. Trying to tie it into
the membership provider is always a recipe for headaches.
May 2 '06 #4
Let's say you store the properties of each Member as a Profile and want to
query the data for all members from Milwaukee for example or all males over
the age of 35 or whatever. The entire profile for each member is stored as a
series of characters concatenated to one another and stuffed into a single
column. The algorythm for parsing a series of characters concatenated to one
another without a delineator is done how? The answer is we have to write a
sh!tload of code after figuring out how to interpret an undocumented schema
that is present in the Profile table itself.

//A Profile Entry Example:
ClintonGallagherWauwatosaWisconsin53226MilwaukeeCo untyMale5241477415624147741562http://clintongallagher.metromilwaukee.com

See what I mean?
AFIC Profiles are FUBAR and only marginally useful as a replacement for the
Session object for issues related to the state of the application, i.e data
that is not queried intending to be returned as a group of related records.

Somebody correct me if this is wrong...

--
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
"Ray Booysen" <rj***********@rjb.za.net> wrote in message
news:OA****************@TK2MSFTNGP02.phx.gbl...
Thanks, I'll take a look!

Regards
Ray

Riki wrote:
Try using profiles. They are a built in extension for the membership
provider.

--

Riki

"Ray Booysen" <rj***********@rjb.za.net> wrote in message
news:e6*************@TK2MSFTNGP05.phx.gbl...
Hi all

I am using the membership provider and am storing all the login details
via this system.

However, I require to add additional fields that may change over time
that are related to the User. E.g. DOB, Place of birth and all that.

What is the best way to do this? Create a second table taking the
primary key of the aspnet_Users table and use this as a foreign key in
my new table?

Can I extend the provider to take these new fields? If so, how do I
change it in case of new fields?

Regards
Ray


May 2 '06 #5
clintonG wrote:
Let's say you store the properties of each Member as a Profile and want to
query the data for all members from Milwaukee for example or all males over
the age of 35 or whatever. The entire profile for each member is stored as a
series of characters concatenated to one another and stuffed into a single
column. The algorythm for parsing a series of characters concatenated to one
another without a delineator is done how? The answer is we have to write a
sh!tload of code after figuring out how to interpret an undocumented schema
that is present in the Profile table itself.

//A Profile Entry Example:
ClintonGallagherWauwatosaWisconsin53226MilwaukeeCo untyMale5241477415624147741562http://clintongallagher.metromilwaukee.com

See what I mean?
AFIC Profiles are FUBAR and only marginally useful as a replacement for the
Session object for issues related to the state of the application, i.e data
that is not queried intending to be returned as a group of related records.

Somebody correct me if this is wrong...

Do the profiles API not expose methods to retrieve all profiles for all
users?
May 2 '06 #6
That's a documentation question ainna?

--
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
"Ray Booysen" <rj***********@rjb.za.net> wrote in message
news:eO**************@TK2MSFTNGP03.phx.gbl...
clintonG wrote:
Let's say you store the properties of each Member as a Profile and want
to query the data for all members from Milwaukee for example or all males
over the age of 35 or whatever. The entire profile for each member is
stored as a series of characters concatenated to one another and stuffed
into a single column. The algorythm for parsing a series of characters
concatenated to one another without a delineator is done how? The answer
is we have to write a sh!tload of code after figuring out how to
interpret an undocumented schema that is present in the Profile table
itself.

//A Profile Entry Example:
ClintonGallagherWauwatosaWisconsin53226MilwaukeeCo untyMale5241477415624147741562http://clintongallagher.metromilwaukee.com

See what I mean?
AFIC Profiles are FUBAR and only marginally useful as a replacement for
the Session object for issues related to the state of the application,
i.e data that is not queried intending to be returned as a group of
related records.

Somebody correct me if this is wrong...

Do the profiles API not expose methods to retrieve all profiles for all
users?

May 2 '06 #7
clintonG wrote:
Let's say you store the properties of each Member as a Profile and want to
query the data for all members from Milwaukee for example or all males over
the age of 35 or whatever. The entire profile for each member is stored as a
series of characters concatenated to one another and stuffed into a single
column. The algorythm for parsing a series of characters concatenated to one
another without a delineator is done how? The answer is we have to write a
sh!tload of code after figuring out how to interpret an undocumented schema
that is present in the Profile table itself.

//A Profile Entry Example:
ClintonGallagherWauwatosaWisconsin53226MilwaukeeCo untyMale5241477415624147741562http://clintongallagher.metromilwaukee.com

See what I mean?
AFIC Profiles are FUBAR and only marginally useful as a replacement for the
Session object for issues related to the state of the application, i.e data
that is not queried intending to be returned as a group of related records.

Somebody correct me if this is wrong...

ProfileInfoCollection profiles = ProfileManager.GetAllProfiles();

I don't see how your problem occurs now?

With this collection we can write simple code to retrieve the
information we require.

Am I missing something?

Regards
Ray
May 2 '06 #8
On Tue, 02 May 2006 23:10:07 +0100, Ray Booysen wrote:
ProfileInfoCollection profiles = ProfileManager.GetAllProfiles();

I don't see how your problem occurs now?

With this collection we can write simple code to retrieve the
information we require.


One problem is one of scale. Suppose you have 1 million users. You now
have to retrieve all 1 million profiles, then write code to iterate over
them rather than using a simple SQL query to only return the profiles you
are interested in.

Apart from the huge amount of memory this will use, it will also allocate a
lot of small objects, then have to destroy them in GC, all of which suck up
system resources.
May 3 '06 #9
> AFIC Profiles are FUBAR and only marginally useful as a replacement
for the
Session object for issues related to the state of the application, i.e
data
that is not queried intending to be returned as a group of related
records.
Somebody correct me if this is wrong...


Profile is meant to be long term storage of user data, which is different
than the intent of session. The odd persistence choice you're commenting
on is an aspect of the SqlProfileProvider. You can choose a different provider
which can store your data differently. I'd suggest googling for the "Table
Profile Provider" which is a sample provider from MSFT that will store each
profile property in a distinct column in your database.

-Brock
http://staff.develop.com/ballen
May 3 '06 #10
Damn Brock your one very useful dude :-) Thanls for the heads up.

--
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:b8************************@msnews.microsoft.c om...
AFIC Profiles are FUBAR and only marginally useful as a replacement
for the
Session object for issues related to the state of the application, i.e
data
that is not queried intending to be returned as a group of related
records.
Somebody correct me if this is wrong...


Profile is meant to be long term storage of user data, which is different
than the intent of session. The odd persistence choice you're commenting
on is an aspect of the SqlProfileProvider. You can choose a different
provider which can store your data differently. I'd suggest googling for
the "Table Profile Provider" which is a sample provider from MSFT that
will store each profile property in a distinct column in your database.

-Brock
http://staff.develop.com/ballen

May 4 '06 #11

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

Similar topics

9
by: Paul Keegstra | last post by:
Hi, I am currently working on an asp.net 2.0 web site that is a replacement of a classic asp web site. The current web site uses a Commerce Server 2002 database for storing user information. ...
4
by: Pony Tsui | last post by:
I was install the starter kits CLUB, and created a CLUB WEB SITE, this application use the MemberInfo table in club.mdf to store the membership'data, but i can not find out where to define or...
2
by: Balaji | last post by:
Hi All, Can I use more than one membership provider for a given website? I understand only one of them could be default one. If yes, then how to programmatically access the other membership...
3
by: ryan.mclean | last post by:
Hello everyone, I am wondering, can the membership provider be changed at runtime? Perhaps the connectionStringName? I would like to use a different database based on the server the site is...
4
by: =?Utf-8?B?Q2hyaXMgQ2Fw?= | last post by:
I have been having some trouble with implementing a custom Membership Provider. We have a custom data store and business logic that pulls user information. I need some level of functionality...
4
by: =?Utf-8?B?U2FsYW1FbGlhcw==?= | last post by:
Hi, I am trying to play with the Survey manager application provided gracefully by Microsoft at "http://msdn.microsoft.com/vstudio/express/sql/samples/" VB team(so many thanks), compiled the win...
3
by: Glenn | last post by:
My current classic-ASP site has users, projects, roles and the 2.0 membership looks like a perfect fit, but I'm having trouble finding examples of how to have users that belong to different...
1
by: =?Utf-8?B?ZVByaW50?= | last post by:
Asp.Net v2.0 I have created a web application and I am using it from a single website and database. The web application has different ‘portals’ – each independent and I am using the...
1
by: =?Utf-8?B?ZVByaW50?= | last post by:
Asp.Net v2.0 I have created a web application and I am using it from a single website and database. The web application has different ‘portals’ – each independent and I am using the...
8
by: Nick | last post by:
Hi there, Membership.GetNumberOfUsersOnline() works great the first time, then jumps up to the number of users registered in the system. I have tried enumerating through each user individually...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...

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.