Login Control LoggedIn event is user Authenticated

Discussion in 'ASP .Net' started by Shimon Sim, May 25, 2006.

  1. Shimon Sim

    Shimon Sim Guest

    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.
    Shimon Sim, May 25, 2006
    #1
    1. Advertising

  2. 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"/>

    --
    Co-founder, Eggheadcafe.com developer portal:
    http://www.eggheadcafe.com
    UnBlog:
    http://petesbloggerama.blogspot.com




    "Shimon Sim" wrote:

    > 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.
    >
    >
    >
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, May 26, 2006
    #2
    1. Advertising

  3. 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.)
    Steven Cheng[MSFT], May 31, 2006
    #3
  4. 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.)
    Steven Cheng[MSFT], Jun 8, 2006
    #4
  5. Shimon Sim

    Shimon Sim Guest

    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.

    "Steven Cheng[MSFT]" <> wrote in message
    news:...
    > 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.)
    >
    Shimon Sim, Jun 8, 2006
    #5
  6. 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.)
    Steven Cheng[MSFT], Jun 9, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SmF2?=
    Replies:
    2
    Views:
    2,114
  2. Maxus
    Replies:
    0
    Views:
    444
    Maxus
    Apr 12, 2007
  3. Rusty Hill
    Replies:
    1
    Views:
    461
    Rusty Hill
    May 24, 2007
  4. Rusty Hill

    Login LoggedIn event and Profile object question

    Rusty Hill, May 24, 2007, in forum: ASP .Net Security
    Replies:
    1
    Views:
    152
    Rusty Hill
    May 24, 2007
  5. Abhijit
    Replies:
    0
    Views:
    143
    Abhijit
    Apr 12, 2004
Loading...

Share This Page