Problem getting LoginRequest event handling to work in 1.6.4 (or 1.6.3)

Eric Meyer's Avatar

Eric Meyer

27 Jan, 2012 07:54 PM via web

I am having a problem accessing sites that require credentials. I have attached some very simple code that I have tried, that does not work. However I can access the same site with the same credentials using your WPF and WinForm examples without problems.

I have looked at the generated log and I see where the site is requesting credentials, but never see the response logged. However if I look in the logs from your WPF example I can plainly see the response being logged.

Suggestions?

-Eric Meyer

  1. Support Staff 2 Posted by Perikles C. Stephanidis on 27 Jan, 2012 08:17 PM

    Perikles C. Stephanidis's Avatar

    Hello Eric,

    The event arguments instance passed to the LoginRequest event (LoginRequestEventArgs), inherits CancelEventArgs. The Cancel property in LoginRequestEventArgs is by default set to true. Please explicitly set it to false to get the desired behavior.

    This should be clearly mentioned in the documentation. Thank you for the feedback.

    Regards,
    Perikles

  2. 3 Posted by Eric Meyer on 27 Jan, 2012 08:29 PM

    Eric Meyer's Avatar

    That fixed it! Thank you!

    Note: I looked in the documentation again (.NET docs) and I can't find any mention of that.

    -Eric

  3. Support Staff 4 Posted by Perikles C. Stephanidis on 27 Jan, 2012 08:31 PM

    Perikles C. Stephanidis's Avatar

    Glad it was an easy fix. :-)

    You are right about the documentation. We will update the docs to reflect this.

    --Perikles

  4. Perikles C. Stephanidis closed this discussion on 27 Jan, 2012 08:31 PM.

Comments are currently closed for this discussion. You can start a new one.