Get anonymous user

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
 
S

shapper

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
 

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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top