Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find asp:Login LoginError error type

When the LoginError event fires for the asp:Login control, how can I find why the error happened?

Is there something like an e.ErrorType property that tells me why the login was unsuccessful? Or do I have to check everything manually like in this tutorials:

http://www.asp.net/security/tutorials/validating-user-credentials-against-the-membership-user-store-cs or http://www.aspnettutorials.com/tutorials/controls/howto-errors-login-asp4-csharp.aspx

like image 224
Mentoliptus Avatar asked Aug 25 '11 13:08

Mentoliptus


People also ask

How to show error message in ASP net?

You can use the standard ASP.NET MVC ValidationSummary method to render a placeholder for the list of validation error messages. The ValidationSummary() method returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object.

What is an ASP error?

The ASPError object is used to display detailed information of any error that occurs in scripts in an ASP page. Note: The ASPError object is created when Server. GetLastError is called, so the error information can only be accessed by using the Server. GetLastError method.

How does ASP net handle application level errors?

Application level error handling allow to detect or handle web application level error handling so that its helps to handle and solve the particular error. 2. Add a <customErrors> element in web. config file for your web application.


1 Answers

There is no "Out-of-the-box" error type information as far as I've seen in the past for the LoginError event (although I agree with you that it would be really nice). In fact, in my experience the EventArgs parameter is always null for me for that event in the asp:Login control =/

It's quite possible that someone else is aware of something I'm not, but I think we are all stuck manually determining why the LoginError occurred for now.

like image 146
Josh Darnell Avatar answered Oct 08 '22 00:10

Josh Darnell