Login Control LoggedIn event is user Authenticated

S

Shimon Sim

I am working with LogIn control and need to set some property for profile
after user is authenticated. I thought that LoggedIn event is the right
place but system tells me that the property can't be set for anonymous user.
I checked User.Identity.IsAuthenticated = false. So when is the good place
to set profile properties? Again I need to set up it only once right after
user logged in.
Thank you.
 
G

Guest

Shimon,
To enable profile operation for the anonymous user, you must add this to
your web.config (along with other items):

<system.web>
<anonymousIdentification enabled="true"/>
 
S

Steven Cheng[MSFT]

Hello Shimon,

As other member has mentioned, you need to first enable
"anonymousIdentification" and also set those certain profile properties to
"allowAnonymous" accessing. And as for the Login control's "LoggedIn"
event, it is specific to the login page scope which can let us do some
operation on the page to update the UI after the user has clicked login
button and successfully loggedin. However, that that event time, the
HttpContext.User(or the profile service identity) is still not updated yet,
so this event is not quite suitable for your task.

Based on my research, if you want to adjust some profile properties after
the user has loggedIn(change from anonymousIdentity to a valid
authenticated identity), you can use the ProfileModule's "MigrateAnonymous"
event which will get fired after the user has loggedIn and this event is
specific to profile service. You can migrate some profile properties' value
from original anonymous identity to the authenticated identity:

#ProfileModule.MigrateAnonymous Event
http://msdn2.microsoft.com/en-us/library/system.web.profile.profilemodule.mi
grateanonymous.aspx

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
S

Steven Cheng[MSFT]

Hey Shimon,

How are you doing on this issue, does my last reply helps you a little? If
there is anything else we can help, please feel free to post here.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
S

Shimon Sim

Thanks
I didn't know that you answered anything till now. For some reason Outlook
Express missed it.
I just checked in on the web - using web reader.
Thanks it was helpful.
 
S

Steven Cheng[MSFT]

You're welcome Shimon,

Feel free to post here when you need any help:)

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top