hyyly / csexwb2

Automatically exported from code.google.com/p/csexwb2
0 stars 0 forks source link

WBAuthenticate fired only the first time I ran my app, a Windows Forms using csexwb2. #53

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create Windows forms app, add csexwb2 project, add control to main form.
2. Add handler for wbauthenticate
3. Create web site that uses basic authentication
4. access web site from app
5. set break point in handler method

What is the expected output? What do you see instead?
Expected breakpoint to be reached. No dialog to be shown.

What are the OS and IE versions?
Xp sp2 IE 7.0

What version of the product are you using?
2.0.0.2

Please provide any additional information below.
This is my mainform
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WBWrapperHost
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            WebBrowser.WBAuthenticate += new 
csExWB.AuthenticateEventHandler(WebBrowser_WBAuthenticate);
        }

        void WebBrowser_WBAuthenticate(object sender, 
csExWB.AuthenticateEventArgs e)
        {
            e.username = "Richard Kern";
            e.password = "pood56by";
            e.handled = true;
            e.retvalue = 0;
        }

        private void GoButton_Click(object sender, EventArgs e)
        {
            WebBrowser.Navigate(UrlTextBox.Text);
        }
    }
}

Original issue reported on code.google.com by rk...@nc.rr.com on 26 Jul 2008 at 5:35

GoogleCodeExporter commented 9 years ago
Hi,

I can not reproduce the behaviour. wbauthenticate fires consistently when I am 
using 
basic authentication. WinXp sp2 IE7

Questions:
After the first time,
Does the authentication succeeds and the target page is loaded?
Do you see a dialog?
Is there any error messages?

Suggestion:
Try deleting IE cache, cookies , and try again.

Regards,

MH

Original comment by mehr...@gmail.com on 27 Jul 2008 at 1:11

GoogleCodeExporter commented 9 years ago
Mike,
Thank you for the timely reply. By experimentation I found that a call to 
NavToBlank 
in formLoad solves this issue.

Original comment by rk...@nc.rr.com on 27 Jul 2008 at 1:45