SHDocVw authetication

  • Thread starter Thread starter Eli Allen
  • Start date Start date
E

Eli Allen

So now that MS04-004 is out breaking the ability to pass in a
password/username through the URL how can we pass in a username and password
using SHDocVw in c#?

I'm launching IE like this:
http://samples.gotdotnet.com/quickstart/howto/doc/Interop/TestClient_1.aspx
http://www.codeguru.com/cs_webservices/WebInt.html
with this meathod of referencing SHDocVw:
http://weblogs.asp.net/stevencohn/archive/2004/01/23/62117.aspx

so my code looks like:
<code>
object o = null;
InternetExplorer ie = null;
ie = new InternetExplorerClass();
IWebBrowserApp wb = (IWebBrowserApp) ie;
string
sEncodedCreds=Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(use
rName + ":" + password ));
object headers=((object)("Authorization: Basic " + sEncodedCreds + "\r\n"));
wb.Navigate(url, ref o, ref o, ref o, ref (object)headers);
wb.Visible = true;
</code>

But can't find anyway to pass authetication into the IEApp.Navigate(sURL,
vFlags, vFrameName, vPostData, vHeaders) method. I'm trying to pass in the
basica auth through the header and that works for the page load but IE
obviously doesn't know its authenticating so none of the links off the page
work.

Any ideas? Thanks
 
Yahnn, you are dreaming.


======

But nice to see gasping MS realizing how their "Innovations"
trickle down to nothing.
 
Back
Top