Connecting Tech Pros Worldwide Forums | Help | Site Map

UserID of Anonymous user

matt.sickler@gmail.com
Guest
 
Posts: n/a
#1: Jun 26 '06
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


bruce barker \(sqlwork.com\)
Guest
 
Posts: n/a
#2: Jun 26 '06

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