Get anonymous user

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I am trying to get an anonymous user using the following:

MembershipUser user = System.Web.Security.Membership.GetUser();

However, user is null. On my Web.Config I have the following:

<anonymousIdentification
cookieless="UseCookies"
cookieName=".AnonymousIdentification"
cookiePath="/"
cookieProtection="Validation"
cookieRequireSSL="false"
cookieSlidingExpiration="true"
cookieTimeout="100000"
enabled="true"/>

I cleaned all my browser cookies and ran the web site but I always get
user = null.

What am I doing wrong?

Thanks,

Miguel
 
The overall goal is ? You are confusing MemberShip and Profile ?

I'm not sure what you expect to get for an anonymous user (i.e. by design
the user is not known so ???). The profile feature on the other hand have
the ability to migrate an anonymous profile to an authenticated user (if
this is what you are looking for)

--
Patrice

"shapper" <[email protected]> a écrit dans le message de groupe de
discussion :
(e-mail address removed)...

I understand that an anonymous user is set my a cookie.
But when using a custom profile provider that inherits ProfileBase how
can I get the anonymous properties of the anonymous user?

I tried always get an error ... that is why I was thinking I might
need to somehow get the anonymous user first or something like this.

Thanks,
Miguel
 
Back
Top