G
Guest
Hi all,
I am writing an application in .net 2.0.
Normally, in my previous projects i have always carried
certain information about authenticated users around in Session variables.
IE: AccountID, UserRoleID & EmailAddress.
Now with 2.0 i know there are a few new classes available that are designed
to handle this kind of info. So in my app, I have created a custom
membership & role provider.
This allows me to determine what role a user is currently logged in under &
to perform
basic authentication and the like.
However, out of the box, these providers may not provide a particular bit of
information
about a user i am after. IE: I believe using the Membership Api i can
retrieve a users
username, password ect...but no their associated 'ID'. (This is probably
wrong)
So my question is, with the number of new options available where should i
provide access to these
info.
1) Should i create my own MembershipProvider.GetUserAccountID method.
2) Or simply store this id in a session variable once a user logs in...
this has been the standard way of mananging this information until now.
3) Is this somewhere the profile class would come in....
At this stage, i am not looking for anything terribly robust...as the
information i
require is very little, and mostly to do with my web apps administration.
With a number of options available, i am just after what you guys are doing...
What your thoughts on how to proceed are ?
Or to clear up any ignorance!!!
Cheers,
Adam
I am writing an application in .net 2.0.
Normally, in my previous projects i have always carried
certain information about authenticated users around in Session variables.
IE: AccountID, UserRoleID & EmailAddress.
Now with 2.0 i know there are a few new classes available that are designed
to handle this kind of info. So in my app, I have created a custom
membership & role provider.
This allows me to determine what role a user is currently logged in under &
to perform
basic authentication and the like.
However, out of the box, these providers may not provide a particular bit of
information
about a user i am after. IE: I believe using the Membership Api i can
retrieve a users
username, password ect...but no their associated 'ID'. (This is probably
wrong)
So my question is, with the number of new options available where should i
provide access to these
info.
1) Should i create my own MembershipProvider.GetUserAccountID method.
2) Or simply store this id in a session variable once a user logs in...
this has been the standard way of mananging this information until now.
3) Is this somewhere the profile class would come in....
At this stage, i am not looking for anything terribly robust...as the
information i
require is very little, and mostly to do with my web apps administration.
With a number of options available, i am just after what you guys are doing...
What your thoughts on how to proceed are ?
Or to clear up any ignorance!!!
Cheers,
Adam