Occurs when the logon fails.
The LogonFailed event's data class is LogonFailedEventArgs. The following properties provide information specific to this event:
|Exception||Returns the exception that was raised when logging on.|
|Handled||Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing. Inherited from HandledEventArgs.|
|LogonParameters||Returns the current logon parameters.|
Handle this event to process the exception that failed the logon. This exception is available via the handler's LogonFailedEventArgs.Exception parameter. You can also access the current logon parameters via the handler's LogonFailedEventArgs.LogonParameters parameter.
To avoid throwing the exception, set the handler's Handled parameter to true.