473,387 Members | 1,575 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,387 software developers and data experts.

Help with user authentication

Hi all, I am using the ASP.NET 2.0 security model to impliment user access
control on my site. I have a few questions hopefully someone can answer:

1) From the encrypted ticket stored in the cookie (available in
User.Identity) how can I access the users userId value?

2) If a user is logged in, is the corresponding information in the
aspnet_user and membership tables loaded somewhere that can be accessed?

3) Can the aspnet_user and membership tables be extended to hold some site
specific information?

Thanks for any and all help,
Taz
Sep 21 '06 #1
1 1366
when the user logs in a membership object is created which contains the user
information. So, for instance, you can get the user email id using
Membership.GetUser(Context.User.Identity.Name.ToSt ring).Email

And yes, you can customize the membership services, using membership
provider class. for example, if you want to and a column to the user role,
say, changepasswordonlogin, then you would something like below

<profile enabled="true" defaultProvider="CustomProfileProvider">
<properties>
<add name="changepasswordonlogin" type="boolean"/>
</properties>
<providers>
<add name="CustomProfileProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="ConnectionString"/>
</providers>
</profile>

hope this helps.

--
---------------------------
Thanks,
Ibrahim

Software Consultant - Web Development, GB
"Tarun Mistry" wrote:
Hi all, I am using the ASP.NET 2.0 security model to impliment user access
control on my site. I have a few questions hopefully someone can answer:

1) From the encrypted ticket stored in the cookie (available in
User.Identity) how can I access the users userId value?

2) If a user is logged in, is the corresponding information in the
aspnet_user and membership tables loaded somewhere that can be accessed?

3) Can the aspnet_user and membership tables be extended to hold some site
specific information?

Thanks for any and all help,
Taz
Sep 21 '06 #2

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

Similar topics

10
by: Brian Conway | last post by:
I have no idea what is going on. I have a Login screen where someone types in their login information and this populates a datagrid based off of the login. Works great in debug and test through...
3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
3
by: Reza | last post by:
Hello I tried this friday, but didn't get anywhere so trying again Basically, I have a fixed list of people that can access the application in the Intranet, and with the policy of the company the...
2
by: pv | last post by:
Hi everyone, I need help with following scenario, please: Users are accessing same web server from intranet (users previously authenticated in Active Dir) and from extranet (common public...
2
by: Joe Rigley | last post by:
Help Please! I've been tasked with converting a portion of the corporate web site that currently utilizes local user accounts and NTFS via Basic Authentication to access certain files on the...
2
by: Bruce Groen | last post by:
I am having some authentication issues. I download a sample app to test the forms based authentication process of asp.net and it works on one of my servers but not the other one. The one that it...
6
by: varkey.mathew | last post by:
Dear all, Bear with me, a poor newbie(atleast in AD).. I have to authenticate a user ID and password for a user as a valid Active Directory user or not. I have created the IsAuthenticated...
3
by: Miguel Dias Moura | last post by:
Hello, I am working on an Asp.Net 2.0 / SQL 2005 web project where: 1. All users must login. 2. There will be two user types: student and professor. The students and professors are not related....
4
by: Kimon Ifantidis | last post by:
Vey simple, but does not work: I'm trying to set a data-driven Web page with a GridView control. The steps I followed are: 1. Created a data connection using Database Explorer. 2. Dropped an...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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...

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.