UserID of Anonymous user

M

matt.sickler

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.UserName);
return (Guid)mu.ProviderUserKey
 
B

bruce barker \(sqlwork.com\)

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top