Getting System.InvalidCastException in the IE toolbar

Add-in Express™ Support Service
That's what is more important than anything else

Getting System.InvalidCastException in the IE toolbar
 
Pratibha Pandey




Posts: 33
Joined: 2010-06-30
Hi Team,

When I run my toolbar on my system, it runs perfectly but on other system: It is giving me following error:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to class type 'mshtml.HTMLHtmlElementClass'. COM components that enter the CLR and do not support IProvideClassInfo or that do not have any interop assembly registered will be wrapped in the __ComObject type. Instances of this type cannot be cast to any other class; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
at InFocusToolbar_IE8.IEModule.BindDOMTree()
at InFocusToolbar_IE8.IEModule.BindDOMTreeWorkerClassMethod(InFocusIEBar objInFocusIEBar, Boolean value)
at InFocusToolbar_IE8.InFocusIEBar.pTimer_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
InFocusToolbar_IE8
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/SSB%20BART%20Group,%20Inc/InFocus%20Toolbar/InFocusToolbar_IE8.DLL
----------------------------------------
AddinExpress.IE
Assembly Version: 5.1.255.0
Win32 Version: 5.1.255.0
CodeBase: file:///C:/Program%20Files/SSB%20BART%20Group,%20Inc/InFocus%20Toolbar/AddinExpress.IE.DLL
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
InFocusToolbar_IE8.resources
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/SSB%20BART%20Group,%20Inc/InFocus%20Toolbar/en-US/InFocusToolbar_IE8.resources.DLL
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Interop.SHDocVw
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Program%20Files/SSB%20BART%20Group,%20Inc/InFocus%20Toolbar/Interop.SHDocVw.DLL
----------------------------------------
Microsoft.mshtml
Assembly Version: 7.0.3300.0
Win32 Version: 7.0.3300.0
CodeBase: file:///C:/Program%20Files/SSB%20BART%20Group,%20Inc/InFocus%20Toolbar/Microsoft.mshtml.DLL
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.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.

[QUOTE][B]

Can you please tell me whats the issue as I am not able to figure it out as it is giving no error in my computer?
One thing is that I was not getting this error in the previous version of my toolbar but now its an issue :( :( :( :( :(
Posted 06 Aug, 2010 02:42:35 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Pratibha,

What version and build number of Add-in Express do you use? IE version?

How can I reproduce the issue you described above? Could you please send a sample project to the support e-mail address (see readme.txt)?
.NET, Extended MAPI, Windows Phone & RT
Posted 06 Aug, 2010 07:44:26 Top