How can I carry anonymous users profile information to authenticated user

Hello
I can carry the anonymous users profile information like favourite team name etc but when the user logs in how can I  carry the profile knowledge to the authenticated users profile.

Good Nights
0
omer_c
8/19/2006 8:12:23 PM
asp.net.security 27051 articles. 1 followers. Follow

3 Replies
681 Views

Similar Articles

[PageSpeed] 15

Please provide some more information about the hangup. At least I couldn't understand what exactly are you trying to achieve.



So simple... yet so effective.
My "Life"ly Blog
0
uXuf
8/20/2006 3:21:34 AM

You need to add the Profile_MigrateAnonymous event in your global.asax. Here's a sample:

 
void Profile_MigrateAnonymous(object sender, ProfileMigrateEventArgs e)
    {
        //Migrate Profile
        ProfileCommon objAnonyProfile = Profile.GetProfile(e.AnonymousID);

        //Check to make sure this is only migrated one time
        if (Profile.EmailAddress == string.Empty)
        {
            //Now migrate the properties
            Profile.EmailAddress = objAnonyProfile.EmailAddress;
            Profile.IsWICParticipant = objAnonyProfile.IsWICParticipant;
            Profile.IsConsumerPanelOptin = objAnonyProfile.IsConsumerPanelOptin;
            Profile.PollsCompleted = objAnonyProfile.PollsCompleted;
        }

        //Write the changes back to the DB
        Profile.Save();

        //It is important to tell the AnonymousIdentificationModule to clear the anonymous identifier (the cookie). 
        //  Without this call the event will continue to fire with each page the authenticated user visits. 
        AnonymousIdentificationModule.ClearAnonymousIdentifier();
    }
 This will allow you to move your anonymopus profile properties to an authenticated user's profile as soon as they authenticate.
Sebastian G.
0
sebatwerk
8/21/2006 12:27:48 AM

Hello ,

Sebatwerk , thanks for your help.

0
omer_c
8/21/2006 9:34:39 AM
Reply:

Similar Artilces:

How to Synchronize anonymous users with authenticated users using profiles?
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 delete one item from the basket in a shopping cart when the user is still anonymous, the item comes back right after I log out. I would like to know if is there any way to synchronize both directions so that the user sees the information in the basket either as being anonymous user or authenticated user?   void Profile_MigrateAnonymous(object sender, ProfileMigrateEventArgs e) {...

Modify User Information / User Profile
I have been rooting around looking for the answer... with no luck... I want to modify the User Information / User Profile collected, for example delete MSN, AIM and Yahoo and add City, State and Zip. Where is this? Is it right in front of my nose? Thanks in advance, (again). The table in the DB is the Community_Users table. You will have to either extend this table, or create a new table using a foreign key relationship to the users table to hold your new fields. You probably don't need to mod any stored proc though since the profile procedures use select * (bad design, but ...

Can't get AD user detail information to populate when user surfs to site for first time (Windows Authentication Turned on)
I am hoping that someone might shed some light on this.  I have DNN 3.2 loaded and all works fine.  I went to the Authentication module and setup that with windows authentication turned on and setup my AD settings and clicked Update.  Everything came back with "OK" status.   My problem is that when a user naivigates to the site their detail information is not being pulled from AD and populating the DNN user profile.  All that is getting populated is the username.  "YES" there is full information for all 300 + users in my AD profiles.  In previous versi...

How to store user profile information during create user?
Hi, I'm just try to store user information during create user via CreateUserWizard that add Textbox, DropDownList and RadoButtonList. How to store data form control to UserProfile (via CreateUserWizard) ? Note. I set DisableCreatedUser = true because want to proof user befor activate. (Begining ASP.net V2.0, VB, VWD 2005 Express Edition) Here is some example c# code that I have in the CreateUser event of the CreateWizard command.  I also do some stuff after this but I think this is the code you are interested in.     protected void CreateUserWizard1_CreatedUser(objec...

How can I secure against anonymous users
I have an app that will never allow anonymous users, how should I setup the web.config authoization section?   I have an app that will allow anonymous users to access only one sub folder, how should I setup the web.config authorization section in it?    Thank youJackxxx For the first case you can use the following: <configuration> <system.web> <authentication> <deny users="?" /> </authentication> </system.web></configuration>For the second case you can use the following: <configuration> &l...

Manage Users
Hello, I would like to manage all available users with their custom profile datas, eg. firstname. I can get the profile datas of the logged-in user (VB code: txtBoxFirstName.Text = Profile.FirstName) but how can I list all the not-logged-in users with their usual datas (eg. e-mail address) and their profile datas? Thank you in advance   Because of performance issues I don't recommend you to use the Profile if you need to list all users’ properties on a single page. But if you only have a few users, then it's fine ;) To get the profile for all users you can for examp...

How can I get the user login ID by user Profile.FullName
I have a multiple user fullname list in a page(the fullname is stored in Profile). I need to save the user LoginID into the database when I select the user fullname.How can I get the user login ID by user Profile.FullName?Thanks. I get the answer: 1.get all user 2. create profile3. get the fullname to compare and get the IDCheers*  Hi,As per my understanding you have Key = Value pair where Key =  FullName and Value=LoginID. What i would suggest that you store this key value pair in Profile using HttpContext.Current.Profile.SetPropertyValue(FULLNAME,LOGINID); [Put it once in...

Controlling what user can do (anonymous or authenticated)
I am writing a web site where users can browse without authentication, users can register themselves, users can sign in to the system. Some pages can be viewed by anyone, some pages can only be viewed by authenticated users, and by their role. Also, the behaviour of some pages depends on is the user authenticated or not, and by the role. Data is stored in relational database (currently SQL Server) and it is accessed via business logic. I have written a page where user can register him/herself. When user is authenticated, this page should show her/his own data. I want to add a panel, which i...

can't copy user profile to new user
I run as administrator on my only account for my XP single user setup. Listening to Steve's show, I decided to try and setup a non-admin account for everyday use. The trouble is I don't want to reinstall all my programs and settings. I tried to copy the original account profile to the new account but when I go into the settings under computer/advance tab, the "copy to" is grayed out and disabled for my original account. The delete is also disabled. Any ideas on resolving this. -- Phil Phil wrote: > I run as administrator on my only account ...

how can I reteive the profile of a user that is NOT the current loggedin user on the client?
with the asp.net ajax....  I have read the documentation about the profile servie but it seems everywhere it always says :" this loads the profile of the CURRENT user etc...   where I would want to access profile properties of other users as well how? is it possible?   yes you can... the whole data is stored in a standard table for profile provider which is aspnet_Profile, you can communicate with it like any other tabel (insert, update & delete)...Regards...Nassar, RamiMy Blog || E-Mail Don't forget to click "Mark as Answer" on the post that he...

How update or modify all users profile properties in one authenticated user!
How update or modify all users profile properties in one authenticated user!   Are you looking for a way to load the profile data for a user based on just their username, and then save the updated data back to the database?  If so you use code like: ProfileCommon p = Profile.GetProfile("some user name here");p.SomePropertyValue = "new value";p.Save();-Stefan----------------------------------------------------------This posting is provided "AS IS" with no warranties, and confers no rights....

Combining non-authenticated users with authenticated users
Hi!I'm busy with "upgrading" my ASP-website's to asp.Net-website's.I've done a lot of tutorials on the net, but I still have a question. All the tutorials are about securing a whole directory (I need to use forms authentication). This means, a user is logged in and can access all files in the secured directory. When the user is not logged in, he will be forwarded to the login-page.My question is about the technique used, for example, by forums. A user that is not logged in, can read the page. But a user that is logged in, can read the page also, but has also the rights to post messages....

Single Users Profile and All Users Profiles List
I've made a discussion forum. And I have also installed simply asp.net membership. Now I want after click on user link to redirect to the page with User's info.I have simply user "John" and user "Bob" and everyone can click on those names and will see page with informations stored in Profile (Like Profile.Name, Profile.Address). I have three simply question:1. How to show profile values of other User ? Like I wrote above.2. How to list all users with for example their e-mails ? I mean: UserLogin - UserName - UserMail3. Or the easier way is to make new table with those all information an...

Assigning an anonymous profile to an authenticating user
  I have a shopping cart. The shopping cart object is stored as serialized binary in my web .config file with allowAnonymous set to true. I am using the login control to authenticate a user in the checkout process within a wizard view control. When the user is anonymous the profile stores the shopping cart and retrieved perfectly. The problem is: the moment user logs in, the shopping cart object shows 0 items (not null). Now if the user go back and add some items on the cart then it works perfect. It seems to me that the profile isn’t giving the anonymous profile to the au...

Web resources about - How can I carry anonymous users profile information to authenticated user - asp.net.security

Authenticated encryption - Wikipedia, the free encyclopedia
Authenticated Encryption ( AE ) or Authenticated Encryption with Associated Data ( AEAD ) is a block cipher mode of operation which simultaneously ...

Google Spam Report (Authenticated) - Flickr - Photo Sharing!
When you are logged into Google Webmaster Central, you can report any site that is spamming the SERPs through this tool. Post at Does Google ...

Authenticated electricity: Sony power outlets will charge you for charging
Sony is building a new kind of power outlet that raises a not entirely pleasant prospect—in the future, plugging a phone into a public wall socket ...

MLB Authenticated Game-Used Base Bar Stool
Like. From The Green Head: "If you love America's favorite pastime, now you can sit on an actual piece of it. These unique collectible bar stools ...

C-SPAN Moving to Authenticated TV Ch. Streaming
C-SPAN is launching a beta test of its migration of live online feeds of its TV channels—C-SPAN 1,2,3—to an authentication model starting Monday, ...

FDA "Corruption" Letter Authenticated: Lawyers, Start Your Engines!
The FDA's official recognition of the letter means that lawyers who want to use it to demonstrate that the FDA isn't perfect won't have to go ...

Buddy Rich's Authenticated and Complete 1960s Zildjian Cymbal Set Available on eBay for $29,995
Buddy Rich's complete 1960s Zildjian cymbal set is available for purchase on eBay. In the massive world of the Internet, anything is apparently ...

FileVault's authenticated restart has hardware requirements
If you use FileVault and wish to restart remotely, you can do so with the 'fdesetup' command; however, this does have some hardware limitations. ...

BREAKING: Michael Brown Audio Aired By CNN Authenticated
Video messaging service Glide has confirmed to the Washington Post the exact time and date the audio recording with gunshot sounds on it was ...

Sheriff: Brenham vet can't be charged with killing cat unless Facebook photo is authenticated
As a team investigated the image, the clinic where Kristen Lindsey worked said Friday that she'd been fired and condemned her post "in the strongest ...

Resources last updated: 12/4/2015 8:15:06 PM