.NET Questions (CLOSED)

Questions and Answers on any aspect of .NET. Now closed.

This discussion group is now closed.

Have a question about .NET development? Try stackoverflow.com, a worldwide community of great developers asking and answering questions 24 hours a day.

The archives of .NET Questions contain years of Q&A. Even older .NET Questions are still online, too.

Strange Login Control behavior?

I'm sure this is just my misunderstanding so someone please disabuse me :)

In a nutshell I'm implementing a signup system where someone signs up, get's approval, then are able to log in.  This requires a check at login for 3 different states.  Awaiting Approval, Approved, and Not Approved, along with the appropriate actions.

I'm catching the OnLoggedIn event, but it doesn't appear to be acting the way I would have expected it to.

In particular, the Page.User variable isn't being set prior to the event firing(Page.User.Identity.Name=="").  According to the documentation that I've read this particular event fires *after* authentication, so I would have expected Page.User to be set correctly.

I've verified that the event is actually firing, and I've also verified that the authentication is happening(I'm not simply mispelling the password, etc).

Ultimately all I really need to get at is the username entered into the login control, so if this behavior is intended, how can I go about retrieving the username without rolling my own login?
ASP.Net Noob Send private email
Saturday, January 20, 2007
The Page will populate the User.Principal after the authentication cookie comes back on the next page post. All you have is the UserName within the event. Hope that's all you need.
hobit Send private email
Sunday, January 21, 2007
UserName property is on the login control.
hobit Send private email
Sunday, January 21, 2007
Thanks hobit.  None of the references I've been using mentioned that.  I ended up fumbling around until I thought to check the control itself, lol.  I can't believe it took me as long as it did to check the control.
ASP.Net Noob Send private email
Monday, January 22, 2007

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz