SHDocVw authetication

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
 
N

name

Yahnn, you are dreaming.


======

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top