WebBrowser.Navigate(...) throws COMException

8

I'm developing an Internet Explorer command button that will open a specific web page once clicked. Here's a snippet of code (IEApp is a reference to an instance of IE.WebBrowser):

IEApp.Navigate(sURL, ref one, ref two, ref three, ref four);

The above line throws the following COMException:

Exception Source:      Interop.SHDocVw
Exception Type:        System.Runtime.InteropServices.COMException
Exception Message:     The requested resource is in use. (Exception from HRESULT: 0x800700AA)
Exception Target Site: Navigate

This wasn't a problem on IE6 or IE7. Any ideas on what's going wrong? I'm using AddInExpress for creating the command button.

Cheers! Christian

exception
internet-explorer
browser
comexception
asked on Stack Overflow Feb 9, 2010 by kh34 • edited May 3, 2011 by Courtney Christensen

2 Answers

5

That's ERROR_BUSY usually happens when IE is doing something else, e.g. displaying a window.alert message box.
Try suppress script errors and Implement IDocHostShowUI and return S_OK without blocking the message pump

answered on Stack Overflow Feb 10, 2010 by Sheng Jiang 蒋晟
1

could this help: turning off UAC in Windows, if you are using a server kind version:

screen-shoots here: http://blog.vincentbrouillet.com/post/2011/02/10/watin%3A-The-requested-resource-is-in-use

I had this error, and it was quite random. I tried killing IE before running the tests. It kind of work, but not all the time.

answered on Stack Overflow Feb 10, 2011 by VinceMD

User contributions licensed under CC BY-SA 3.0