Evan Li
asked on
Question of running the program built from sample in codeproject website
Hi Dear Experts:
For the research of how to get HTTP data When I am using IWebBrowser2 interface, I found code project have sample code which can resolve my problem. Here is the link:
http://www.codeproject.com/Articles/157329/Http-Monitor-for-Webbrowser-Control
But I am blocked here, I can compile with Visual studio 2015/2008. By running Administrator privilege Visual studio I can build HTTPMONITOR project and I can register the dll.
I can build demo which is a c# .net to call the dll.
I can run the program which bring up the demo dialog. When I push the button "go"
I got crashed, Here is the dump from the crash:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Runtime.InteropServ ices.COMEx ception (0x80040154): Retrieving the COM class factory for component with CLSID {D5DEA129-C130-4268-A3AB-1 4CED69E052 D} failed due to the following error: 80040154.
at Demo.Page..ctor(IntPtr iEWindow, Control control) in C:\Users\evan_\Documents\V isual Studio 2010\Projects\Demo\Page.cs :line 88
at Demo.Form1.btnGo_Click(Obj ect sender, EventArgs e) in C:\Users\evan_\Documents\V isual Studio 2010\Projects\Demo\Form1.c s:line 43
at System.Windows.Forms.Contr ol.OnClick (EventArgs e)
at System.Windows.Forms.Butto n.OnMouseU p(MouseEve ntArgs mevent)
at System.Windows.Forms.Contr ol.WmMouse Up(Message & m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Contr ol.WndProc (Message& m)
at System.Windows.Forms.Butto nBase.WndP roc(Messag e& m)
at System.Windows.Forms.Butto n.WndProc( Message& m)
at System.Windows.Forms.Contr ol.Control NativeWind ow.WndProc (Message& m)
at System.Windows.Forms.Nativ eWindow.Ca llback(Int Ptr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8670 (QFE.050727-8600)
CodeBase: file:///C:/Windows/Microso ft.NET/Fra mework64/v 2.0.50727/ mscorlib.d ll
-------------------------- ---------- ----
Demo
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/evan_/Doc uments/Vis ual%20Stud io%202010/ Projects/D emo/bin/De bug/Demo.e xe
-------------------------- ---------- ----
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8670 (QFE.050727-8600)
CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /System.Wi ndows.Form s/2.0.0.0_ _b77a5c561 934e089/Sy stem.Windo ws.Forms.d ll
-------------------------- ---------- ----
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8670 (QFE.050727-8600)
CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /System/2. 0.0.0__b77 a5c561934e 089/System .dll
-------------------------- ---------- ----
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8681 (QFE.050727-8600)
CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /System.Dr awing/2.0. 0.0__b03f5 f7f11d50a3 a/System.D rawing.dll
-------------------------- ---------- ----
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8670 (QFE.050727-8600)
CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /System.Co nfiguratio n/2.0.0.0_ _b03f5f7f1 1d50a3a/Sy stem.Confi guration.d ll
-------------------------- ---------- ----
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8679 (QFE.050727-8600)
CodeBase: file:///C:/WINDOWS/assembl y/GAC_MSIL /System.Xm l/2.0.0.0_ _b77a5c561 934e089/Sy stem.Xml.d ll
-------------------------- ---------- ----
Microsoft.mshtml
Assembly Version: 7.0.3300.0
Win32 Version: 7.0.3300.0
CodeBase: file:///C:/WINDOWS/assembl y/GAC/Micr osoft.msht ml/7.0.330 0.0__b03f5 f7f11d50a3 a/Microsof t.mshtml.d ll
-------------------------- ---------- ----
Interop.SHDocVw
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Users/evan_/Doc uments/Vis ual%20Stud io%202010/ Projects/D emo/bin/De bug/Intero p.SHDocVw. DLL
-------------------------- ---------- ----
Interop.HttpMonitorLib
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/evan_/Doc uments/Vis ual%20Stud io%202010/ Projects/D emo/bin/De bug/Intero p.HttpMoni torLib.DLL
-------------------------- ---------- ----
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Can anyone tell me what can I do to make this sample code to run without crash?
Thank you for your help.
Evan
For the research of how to get HTTP data When I am using IWebBrowser2 interface, I found code project have sample code which can resolve my problem. Here is the link:
http://www.codeproject.com/Articles/157329/Http-Monitor-for-Webbrowser-Control
But I am blocked here, I can compile with Visual studio 2015/2008. By running Administrator privilege Visual studio I can build HTTPMONITOR project and I can register the dll.
I can build demo which is a c# .net to call the dll.
I can run the program which bring up the demo dialog. When I push the button "go"
I got crashed, Here is the dump from the crash:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Runtime.InteropServ
at Demo.Page..ctor(IntPtr iEWindow, Control control) in C:\Users\evan_\Documents\V
at Demo.Form1.btnGo_Click(Obj
at System.Windows.Forms.Contr
at System.Windows.Forms.Butto
at System.Windows.Forms.Contr
at System.Windows.Forms.Contr
at System.Windows.Forms.Butto
at System.Windows.Forms.Butto
at System.Windows.Forms.Contr
at System.Windows.Forms.Nativ
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8670 (QFE.050727-8600)
CodeBase: file:///C:/Windows/Microso
--------------------------
Demo
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/evan_/Doc
--------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8670 (QFE.050727-8600)
CodeBase: file:///C:/WINDOWS/assembl
--------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8670 (QFE.050727-8600)
CodeBase: file:///C:/WINDOWS/assembl
--------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8681 (QFE.050727-8600)
CodeBase: file:///C:/WINDOWS/assembl
--------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8670 (QFE.050727-8600)
CodeBase: file:///C:/WINDOWS/assembl
--------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8679 (QFE.050727-8600)
CodeBase: file:///C:/WINDOWS/assembl
--------------------------
Microsoft.mshtml
Assembly Version: 7.0.3300.0
Win32 Version: 7.0.3300.0
CodeBase: file:///C:/WINDOWS/assembl
--------------------------
Interop.SHDocVw
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Users/evan_/Doc
--------------------------
Interop.HttpMonitorLib
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/evan_/Doc
--------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Can anyone tell me what can I do to make this sample code to run without crash?
Thank you for your help.
Evan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This problem has been resolved.
ASKER