473,324 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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

Jav
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.
Jav
Sep 7 '06 #1
2 2227
Jav,
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.

Thanks

"Jav" wrote:
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.
Jav
Oct 2 '06 #2
dgk
On Mon, 2 Oct 2006 15:54:01 -0700, Kleber
<Kl****@discussions.microsoft.comwrote:
>Jav,
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.

Thanks

"Jav" wrote:
>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.
Jav
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.
Oct 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Shimon Sim | last post by:
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...
2
by: brown | last post by:
Is it possible to access the authenticated user data using the Membership and MembershipUser classes from an asp.net 2.0 project that doesn't contain the login controls? For example, one project...
4
by: =?Utf-8?B?Q2hyaXMgQ2Fw?= | last post by:
I have been having some trouble with implementing a custom Membership Provider. We have a custom data store and business logic that pulls user information. I need some level of functionality...
3
by: =?Utf-8?B?TWFyY0c=?= | last post by:
I have a Server.Transfer in my asp:Login LoggedIn event handler. I am forcing transfer to a specific page since I do not want to use the ReturnURL that is in Request.Params (i.e., the user...
2
by: kpg* | last post by:
Hi all, asp.net 2.0 I'm using the login control with no frills to authenticate users. I want to add a value to the user's profile when the user successfully logs in, but I want to do this...
4
by: John | last post by:
Hi 1. Is it possible to disable a user without deleting? 2. Is it possible to add user fields to the membership db such as app's on id for a user? Thanks Regards
1
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hello everyone, I'm using a provider(Custom Membership), which uses WCF services to validate the user. Also implement the method GetUser. In my aspx page of the website used a Login control,...
2
by: Florian Paulus | last post by:
Hello group, i'm trying to load some additionally stored information to a user at login time. That data is self created and stored in an sql database. I hooked in the login control...
0
by: Jeff | last post by:
Hi asp.net 2.0 I wonder what's the best technigue to get the handle to the current loggedin user Is it: HttpContext.Current.User Or is it
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.