Membership.GetUser returns 'nothing' in Login.LoggedIn event

Discussion in 'ASP .Net' started by Guest, Sep 7, 2006.

  1. Guest

    Guest Guest

    I need to get at the ProviderUserKey of the logged in user. I would have
    thought that I could do something like:
    Dim u As MembershipUser = Membership.GetUser
    Dim ProvKey as Guid = CType(u.ProviderUserKey, Guid)
    in the LoggedIn event handler.
    But the Membership.GetUser returns "Nothing"
    For me this would be the ideal place because I need to use the
    ProviderUserKey to look up some additional info in a different database. If
    this cannot be done, where else can I do it? It would not be too efficient
    to do it in the Page_Load of every page.
    Guest, Sep 7, 2006
    1. Advertisements

  2. Guest

    Guest Guest

    Did you get an answer? I'm having the same problem that I can Login in the
    login.aspx but can't read the user logged in the the second page.

    Any advice will be greatly appreciated.

    Guest, Oct 2, 2006
    1. Advertisements

  3. Guest

    dgk Guest

    I ran into this problem also. I ended up moving that code to the
    "starting" page for the app and redirecting folks after checking out
    the profiles.
    dgk, Oct 4, 2006
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.