Hi Linda,
In cases of integrated authentication the browser pops up a dialog box to
prompt the user for a username and password. I want to override this
behavior.
I have done some more research myself and found information about the
IServiceProvider, IProfferService and IAuthenticate interfaces. Howerver, it
is still not clear to me how to tie all of this together. The documentation
is
very scarce on these subjects. Does the browser implement the IProfferService
interface? How can I obtain a reference to it? Can I register my
implementation
of IAuthenticate with it? Again, a little code snippet would be greate.
In cases of WinForms authentication I can use code similar to the following.
This segment navigates to google and puts my name in the search edit control
and sends "Enter". I can do the same in a login form entering the username
and password in the proper fields.
gBrowser.Navigate("
http://www.google.com/");
InternetExplorer gIE = gBrowser.ActiveXInstance as
InternetExplorer;
HTMLDocumentClass docClass = gIE.Document as HTMLDocumentClass;
IHTMLElement query = docClass.getElementById("q");
IHTMLElement2 query2 = query as IHTMLElement2;
query2.focus();
query.innerText = "Adar Wesley";
// Find the HWND of the browser control so I can send it the
keyboard
// messages.
IntPtr IEServerHWND = Win32.FindWindowEx(gBrowser.Handle,
IntPtr.Zero, "Shell Embedding", null);
IEServerHWND = Win32.FindWindowEx(IEServerHWND, IntPtr.Zero,
"Shell DocObject View", null);
IEServerHWND = Win32.FindWindowEx(IEServerHWND, IntPtr.Zero,
"Internet Explorer_Server", null);
Win32.PostMessage(IEServerHWND, Win32.WM_KEYDOWN,
(int)Keys.Enter, 0x000001);
Win32.PostMessage(IEServerHWND, Win32.WM_KEYUP, (int)Keys.Enter,
0xC0000001);
Thanks,