Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Membership.GetUser() always returns null

$
0
0
I have been trying to implement many of the new Membership features in 2.0, and I can't seem to get Membership.GetUser() to return anything but null. I have added a Login control to the page, and written a custom MembershipProvider, whose validateUser method gets called correctly. The user seems to be logged in (as evidenced by the LoginView and LoginName showing correctly at the top of all screens), but anytime I try to get Membership.GetUser(), it returns null.

I've also tried calling other versions of GetUser() with boolean and string arguments, but no luck. Shouldn't Membership.GetUser() at least call the overridden version of this function in my custom provider? Also, why are there 6 forms of Membership.GetUser() but only 2 forms of it in MembershipProvider()?

Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>