Re: GetUser.ProviderUserKey gives me System.NullReferenceException
- From: "Tanzim Saqib" <TanzimSaqib@xxxxxxxx>
- Date: Sun, 6 Jul 2008 11:31:53 +0600
Membership.GetUser() is definitely null in your case. Meaning that the user has not actually been logged in. Can't say much since unsure about your particular scenario.
Tanzim Saqib
W: http://www.TanzimSaqib.com
"Cirene" <cirene@xxxxxxxxxxx> wrote in message news:#kiVgEk3IHA.4800@xxxxxxxxxxxxxxxxxxxxxxx
Using asp.net membership. My login.aspx page goes to the loginredirect.aspx page after the user logs in..
For some reason "Membership.GetUser.ProviderUserKey.ToString" gives me this error:
System.NullReferenceException: Object reference not set to an instance of an object. at loginredirect.Page_Load(Object sender, EventArgs e)
Any reason why? I should be logged in fine.
Is there another way in which I should get the current users UserId?
- References:
- Prev by Date: Re: details view
- Next by Date: Re: Data-bound DataGridView creates bogus empty rows
- Previous by thread: GetUser.ProviderUserKey gives me System.NullReferenceException
- Next by thread: Re: GetUser.ProviderUserKey gives me System.NullReferenceException
- Index(es):
Relevant Pages
|