Hey Dave,
I've got confirmed with our IE guys about the IE WebBrowser control's
BeforeNavigation2 event, the Headers parameter in this event is actually
marked as [in] parameter from COM perspective, so this is read only .... So
far we're limited to use the Navigate or Navigate2 method to make http
request with our custom configured http headers....
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 164402880
| References: <
[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Mon, 12 Dec 2005 10:18:40 GMT
| Subject: RE: Modify Request Header
| X-Tomcat-NG: microsoft.public.dotnet.general
| Message-ID: <
[email protected]>
| Newsgroups: microsoft.public.dotnet.general
| Lines: 72
| Path: TK2MSFTNGXA02.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.general:184289
| NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
|
| Hi Dave,
|
| Welcome to MSDN newsgroup.
| As for the modifying request header question you mentioned, based on my
| research, the IE WebBrowser control's Navigate2 method can help specify
our
| custom http headers when we want to navigate to a certain web document.
e.g:
|
| private void btnNavigate_Click(object sender, System.EventArgs e)
| {
| object obj = null;
| object url = txtUrl.Text;
| object headers = "aaa:aaavalue\r\nbbb:bbbvalue";//"Accept-Language:
| en-us,zh-cn,fr-FR,de-DE;q=0.5";
|
| axWB.Navigate2(ref url, ref obj, ref obj, ref obj,ref headers);
| }
|
|
| Also, the IWebBrowser control also has the "BeforeNavigate2" event which
| fires before navigate to a certain document, however, based on my
testing,
| we could only get the custom headers we specify in Navigate2 method
there,
| we can not reassign or modify the headers there. Regarding on this
event,
| I'll do some further research to see whether it is the by design behavior
| or anything else to workaround it. (I test use the activeX control
rather
| than the .net 2.0's managed webbrowser control....)
|
| I'll update you when I get some further information...
|
| Thanks,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure!
www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
|
|
|
| --------------------
| | From: "Dave Slinn" <
[email protected]>
| | Subject: Modify Request Header
| | Date: Sat, 10 Dec 2005 23:15:57 -0600
| | Lines: 8
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Outlook Express 6.00.3790.1830
| | X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
| | X-RFC2646: Format=Flowed; Original
| | Message-ID: <
[email protected]>
| | Newsgroups:
|
microsoft.public.dotnet.framework.aspnet,microsoft.public.dotnet.framework.w
|
indowsforms.controls,microsoft.public.dotnet.general,microsoft.public.dotnet
|
.languages.vb,microsoft.public.dotnet.languages.vb.controls,microsoft.public
| .inetsdk.programming.w
| | NNTP-Posting-Host: mail.gms.ca 142.165.52.112
| | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| | Xref: TK2MSFTNGXA02.phx.gbl
| microsoft.public.dotnet.framework.windowsforms.controls:26017
| microsoft.public.dotnet.general:184249
| microsoft.public.dotnet.languages.vb:308070
| microsoft.public.dotnet.languages.vb.controls:8487
| microsoft.public.dotnet.framework.aspnet:364071
| | X-Tomcat-NG: microsoft.public.dotnet.general
| |
| | I have a VB app hosting the Webbrowser control. I would like to add
| | "something" to the requests that app is submitted to our web
application
| to
| | indicate that its from this webbrowser and not a separate instance of
IE.
| |
| | Is this possible, keeping in mind that I cannot add anything to the
| | registry, since a user may still use IE to visit the web app.
| |
| |
| |
|
|