We developed a sophisticated application in .NET 3.5 inside Office 2007. In some forms, we use the WebBrowser control to navigate to our HTML pages. The problem is that on some machines, when the control calls the "Navigation" method, it throws the exception "HRESULT E_FAIL error was returned from a call to the COM component".
From the stack trace, note that the exception occurs from the WebBrowser control when the navigation method is called:
in System.Windows.Forms.UnsafeNativeMethods.IWebBrowser2.Navigate2 (Object& URL, Object& flags, Object& targetFrameName, Object& postData, Object& headers) in System.Windows.Forms.WebBrowser.PerformNavigate2(Object& URL, Object& flags, Object& targetFrameName, Object& postData, Object& headers) in System.Windows.Forms.WebBrowser.PerformNavigateHelper(String urlString, Boolean newWindow, String targetFrameName, Byte[] postData, String headers) in System.Windows.Forms.WebBrowser.set_Url(Uri value) in System.Windows.Forms.WebBrowser.set_DocumentStream(Stream value) in System.Windows.Forms.WebBrowser.set_DocumentText(String value)
The PC is VISTA with IE8 and Office 2007 Service Pack 2. We use Visual Studio 2010 and VSTO 3.0.
thanks a lot
robob source share