473,503 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3532
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
3900
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
1244
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
2137
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
1841
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
5451
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
2736
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
5592
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
3388
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
8028
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...
0
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.