By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,855 Members | 1,961 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,855 IT Pros & Developers. It's quick & easy.

How to Synchronize anonymous users with authenticated users using profiles?

P: n/a
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)

{

ProfileCommon anonymousProfile = Profile.GetProfile(e.AnonymousID);

if (anonymousProfile != null && anonymousProfile.CurrentBasketInfo !=
null)

{

Profile.CurrentBasketInfo = anonymousProfile.CurrentBasketInfo;

}

}

PS: if I use ProfileManager.DeleteProfile(e.Anonymous) in my migrate
event, it will clear the anonymous basket. I could then try to set it
back to the authenticated profile when the user updates the
authenticated profile. However, if the user closes and opens the
browser without loging out, there is no way you can set the anonymous
profile= authenticated profile .

Rod

Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
WJ
See http://www.asp.net/Default.aspx?tabindex=8&tabid=47 under "Commerce
Kit". It has what you want.

John
Nov 19 '05 #2

P: n/a
Thanks John, I will take a look.

Rod

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.