473,233 Members | 1,376 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,233 software developers and data experts.

SHDocVw authetication

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/quickst...tClient_1.aspx
http://www.codeguru.com/cs_webservices/WebInt.html
with this meathod of referencing SHDocVw:
http://weblogs.asp.net/stevencohn/ar.../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.E ncoding.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
--
Eli Allen
ea****@bcpl.net
Nov 15 '05 #1
1 3514
Yahnn, you are dreaming.
======

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

---------------

Do not post to more groups than you can grasp, Moron.


"Eli Allen" <ea****@bcpl.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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/quickst...tClient_1.aspx http://www.codeguru.com/cs_webservices/WebInt.html
with this meathod of referencing SHDocVw:
http://weblogs.asp.net/stevencohn/ar.../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.E ncoding.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
--
Eli Allen
ea****@bcpl.net


Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Hautzendorfer | last post by:
Hello, I'm currently working on some printing stuff: I have to print out several .xml files using a stylesheet. Therefor I choose the Internetexplorer PlugIn via SHDocVW. My problem: After...
0
by: Luis Carvalho | last post by:
Hi!! I'm developping a web app that uses the windows authetication to manage it's permissions. In other words, I want only the users that can get in my win2000 machine to be able to access the...
2
by: Sunny | last post by:
Hi, I am new in development. I want to develop a application which send email from yahoo acoount to rediffmail acount I am trying following Code But its giving Server 530 Authetication...
0
by: Jaime | last post by:
Hi, I'm trying to add a link to the Document Actions window on a smart document I'm writing. I've followed the instructions on the Smart Doc SDK's tutorial but it seems that a specific line is...
3
by: Wiktor Zychla | last post by:
I have a problem I cannot solve. My application hosts IE activex control. I follow the standard procedure: I just aximp shdocvw.dll. Note that this gives you two files: axshdocvw.dll and...
2
by: Or Lavy | last post by:
Hi there, As mentioned in message "aximp of shdocvw.dll -> problem with ShellExecute" posted before, aximp creates two files: AxSHDocVW.dll SHDocVW.dll The second has the same name as the...
3
by: Jay A. Moritz | last post by:
I have an application that loads IE and iterates through web pages to retrieve information from the page then activates specific controls to retrieve the next page and iterate through that page for...
4
by: Dick Sutton | last post by:
I am so close, yet oh so far! Here's the problem: I want to load a string variable that contains HTML into an instance of SHDocVw.InternetExplorer. Here's what I have so far: Function...
5
by: SQACSharp | last post by:
I'm trying to automate an action in Internet Explorer.... I'm trying to click an image that open a popup menu. The html code of the iimage look like like <img blabla..OnClick="ShowMenu()"/> I...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.