Haseen Ahmad

Haseen Ahmad

  • NA
  • 53
  • 1.8k

Unable to cast COM object of type 'System.__ComObject'

May 3 2018 9:48 PM
Hi, Everyonce
 
I am working with C# Windows application with using Gecko Browser component when my Form load is loaded then  i just execute "geckoWebBrowser1.Navigate("www.google.com")" this pice of source line and give my below error on that line ,please help me guys what can i do.
 
 
An exception of type 'System.InvalidCastException' occurred in Geckofx-Winforms.dll but was not handled in user code
Additional information: Unable to cast COM object of type 'System.__ComObject' to interface type 'Gecko.nsIDOMWindow'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{B8343993-0383-4ADD-9930-AD176B189240}' failed due to the following error: Interface not registered (Exception from HRESULT: 0x80040155). occurred
 
 
This error on show me on blow line source code :
 geckoWebBrowser1.Navigate("www.google.com");