Connecting Tech Pros Worldwide Help | Site Map

UserID of Anonymous user

  #1  
Old June 26th, 2006, 04:15 PM
matt.sickler@gmail.com
Guest
 
Posts: n/a
Does anyone know how to get the UserID of the Anonymous user?

The following only returns the UserName, not the UserID

HttpContext.Current.Profile.UserName
and
HttpContext.Current.Request.AnonymousID

also, this does not work for anonymous users

MembershipUser mu =
Membership.GetUser(HttpContext.Current.Profile.Use rName);
return (Guid)mu.ProviderUserKey

  #2  
Old June 26th, 2006, 05:15 PM
bruce barker \(sqlwork.com\)
Guest
 
Posts: n/a

re: UserID of Anonymous user


the AnonymousID just a unique number stored in a cookie (if cookies are
enabled), which can be used for tracking or saving profile info for an
anonymous login.

if the login is anonymous, then there is no username as the browser was not
required to send any, thus the term anonymous.

-- bruce (sqlwork.com)

<matt.sickler@gmail.com> wrote in message
news:1151334919.283583.60840@u72g2000cwu.googlegro ups.com...[color=blue]
> Does anyone know how to get the UserID of the Anonymous user?
>
> The following only returns the UserName, not the UserID
>
> HttpContext.Current.Profile.UserName
> and
> HttpContext.Current.Request.AnonymousID
>
> also, this does not work for anonymous users
>
> MembershipUser mu =
> Membership.GetUser(HttpContext.Current.Profile.Use rName);
> return (Guid)mu.ProviderUserKey
>[/color]


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Anonymous User shapper answers 3 October 9th, 2008 03:05 PM
User Profile Data Scott M. answers 4 November 29th, 2007 01:35 AM
Token of user identity ptran123@hotmail.com answers 3 November 19th, 2005 09:50 AM
ASP.NET 2.0 How-To: Bind datasource parameter to UserID? Luke Dalessandro answers 2 November 18th, 2005 07:35 PM