Connecting Tech Pros Worldwide Help | Site Map

UserID of Anonymous user

 
LinkBack Thread Tools Search this Thread
  #1  
Old June 26th, 2006, 03:15 PM
matt.sickler@gmail.com
Guest
 
Posts: n/a
Default UserID of Anonymous user

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, 04:15 PM
bruce barker \(sqlwork.com\)
Guest
 
Posts: n/a
Default 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]


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.