[RESOLVED] Monitor HTTP data sent and recieved over a webbrowser control
How can i monitor the HTTP data (headers including raw html data) that is sent and recieved while a user browses with a web browser control in my application?
is there some way to capture the connection itself into a socket?
thanks in advance,
imadthemad
Basketball-NBA Dream status - quit
Programming-Next Bill Gates Dream status - quit
Becoming a doctor dream - LIVING IT: Med 2\4
Re: Monitor HTTP data sent and recieved over a webbrowser control
i couldn't find a way to do it...
i thought about putting a proxy for the webcontrol and capturing it with a tcplistener
but i couldnt find a way to put a proxy on the webcontrol
any help?
there must be a way, atleast to capture connections by my own application...
Basketball-NBA Dream status - quit
Programming-Next Bill Gates Dream status - quit
Becoming a doctor dream - LIVING IT: Med 2\4
Re: Monitor HTTP data sent and recieved over a webbrowser control
thanks but i have no problem making tcp listeners
i have a problem in that: a) i dont want a permanent proxy on my internet explorer
b) i really just want to monitor what is in the webcontrol. which brings me to the same problem:
how does one set the proxy of the web browser?
It's not like there is webbrowser1.proxy = "127.0.0.1:212"....
alternatively if i could intercept the data just like programs like httpanalyzer, httpbugger, and wireshark do, it would be awesome.
so, i ask again for help...
Basketball-NBA Dream status - quit
Programming-Next Bill Gates Dream status - quit
Becoming a doctor dream - LIVING IT: Med 2\4
Re: Monitor HTTP data sent and recieved over a webbrowser control
Ups... I just noticed this is a .NET forum... I thought I was in the VB6 section
So your talking about a web control (ascx) that is included in a ASP.NET page (aspx) ?
If yes, then I'm not sure how to monitor ONLY the web control because the control becomes part of the aspx page.
Sorry I cannot help. At least now more people will look at this thread
Re: Monitor HTTP data sent and recieved over a webbrowser control
Originally Posted by CVMichael
Sorry I cannot help. At least now more people will look at this thread
hahaha
i think they are using the webbrowser on a windows form ( not asp ) have you tried the webbrowser's before navigate event? it usually allows you to inspect headers.
if you want to look at all data passing through a webbrowser, especially if you are trying to emulate something like wireshark, i think you'll find it may take some pretty heavy low level code using C++ & may be out of the scope of vb.net.
~ if a post is resolved, please mark it as [Resolved] protected string get_Signature(){return Censored;} [vbcode][php] please use code tags when posting any code [/php][/vbcode]
edited: link wont show up http://v b d o t n e t forum.com/index.php?/topic/503-use-proxy-with-web-browser-control/ (without the spaces)
~ if a post is resolved, please mark it as [Resolved] protected string get_Signature(){return Censored;} [vbcode][php] please use code tags when posting any code [/php][/vbcode]
Re: Monitor HTTP data sent and recieved over a webbrowser control
nvm
here is the charming solution
vb Code:
<Runtime.InteropServices.DllImport("wininet.dll", SetLastError:=True)> _ Private Shared Function InternetSetOption(ByVal hInternet As IntPtr, ByVal dwOption As Integer, ByVal lpBuffer As IntPtr, ByVal lpdwBufferLength As Integer) As Boolean
End Function
Public Structure Struct_INTERNET_PROXY_INFO
Public dwAccessType As Integer
Public proxy As IntPtr
Public proxyBypass As IntPtr
End Structure
Private Sub RefreshIESettings(ByVal strProxy As String)
Dim iReturn As Boolean = InternetSetOption(IntPtr.Zero, INTERNET_OPTION_PROXY, intptrStruct, System.Runtime.InteropServices.Marshal.SizeOf(struct_IPI))
End Sub
Basketball-NBA Dream status - quit
Programming-Next Bill Gates Dream status - quit
Becoming a doctor dream - LIVING IT: Med 2\4
Re: [RESOLVED] Monitor HTTP data sent and recieved over a webbrowser control
you're welcome
~ if a post is resolved, please mark it as [Resolved] protected string get_Signature(){return Censored;} [vbcode][php] please use code tags when posting any code [/php][/vbcode]