Hello,
I need to understand the full scope of changing the Profile.UserName
property when a user goes from anonymous to authenticated. It's read-only and
essential to acquiring profile information.
I'm implementing both a custom Membership and Profile provider. I memtion
this because I'm using the UserName passed in through SettingsContext as my
primary key to locating the user's profile data.
However, once logged in, I would like the UserName to change from the
anonymous Guid given by default to the authenticated user's name given when
authenticated.
Basically, whatever I do, the Profile.UserName doesn't stick. When logging
in, I call Profile.Initialize() and Profile.Save(). Throughout that method
call, everything works fine but once I go on to other user controls,
Profile.UserName is back to its original setting.
I also tried setting the User credential by instantiating a IIdentity object
and that doesn't stick either.
Suggestions, background knowledge and pointers would be greatly appreciated.
Thanks,
Kevin