Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Help with user authentication

Reply
Thread Tools

Help with user authentication

 
 
Tarun Mistry
Guest
Posts: n/a
 
      09-21-2006
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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?SWJyYWhpbSBTaGFtZWVxdWU=?=
Guest
Posts: n/a
 
      09-21-2006
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
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
802.11 X port-level authentication or user-level authentication zillah Wireless Networking 0 11-09-2006 10:00 AM
Help: Custom Forms Authentication User Object (iPrincipal?) CodeCowboy ASP .Net 2 02-23-2005 08:32 PM
Failed Authentication, Status "Unsupported Authentication Algorithm" Rafael Cisco 1 11-26-2004 03:57 PM
User Authentication, Active Directory and more (help) Timothy Parez ASP .Net Security 9 07-05-2004 05:26 PM
Forms Authentication, external authentication server, & rerouting to orig. req. URL Andrew Connell ASP .Net 1 10-21-2003 05:41 PM



Advertisments