473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Get anonymous user

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
Nov 14 '08 #1
2 2369
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" <md*****@gmail.coma écrit dans le message de groupe de
discussion :
67**********************************...oglegroups.com...
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

Nov 14 '08 #2
On Nov 14, 6:11*pm, "Patrice" <http://www.chez.com/scribe/wrote:
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" <mdmo...@gmail.coma écrit dans le message de groupe de
discussion :
674cfbc8-eb89-4408-b92a-205ad44bd...@c22g2000prc.googlegroups.com...
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
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
Nov 14 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kevin Hoskins | last post by:
Is there anyway to force authentication of the Anonymous user? Here is the situation: I have an ASP.NET page which calls an assembly which requires a certain level of permissions. The page is...
2
by: pv | last post by:
Hi everyone, I need help with following scenario, please: Users are accessing same web server from intranet (users previously authenticated in Active Dir) and from extranet (common public...
10
by: et | last post by:
I have an asp.net program that uses a connection string, using integrated security to connect to a sql database. It runs fine on one server, but the other server gives me the error that "Login...
4
by: Buggyman | last post by:
Hi, I'm having problems with good old error... Login failed for user 'NT Authority\Anonymous logon'. The default web page comes up fine, but when the user attempts to log in (which checks...
2
by: Rodusa | last post by:
I am trying to Synchronize anonymous users with authenticated uses using Profile_MigrateAnonymous. However Profile_MigrateAnonymous only carries information in one direction, for instance, if I...
1
by: Fred | last post by:
If I select Anonymous in IIS under Security for my application and provide a user other than IUSR which has permissions to create folders, etc. on another server, I am able to create the folder I...
0
by: ashish | last post by:
hi all, I am working with a custom profile provider that stores my business object as profile with anonymous identification turned on. I have a question regarding how it is supposed to work...
3
by: shapper | last post by:
Hello, On my web site I have a property, Visitor, which is available for Anonymous users: public class Visitor { public CultureInfo Culture { get; set; } public List<GuidPolls { get; set;...
3
by: SRK | last post by:
Hi, I wanted to use an anonymous union within an structure something like below - struct Test { union { std::string user; //char user; std::string role; //char role;
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.