Problem hosting WebBrowser control
Posted on 2003-03-02
I'm having a bit of trouble with the web browser control. I implement IDocHostUIHandler and IOleClientSite and set the an instance of the implementing object as the client site for the web browser.
Everything worked fine when the application was a single window containing a web browser, menus etc; however, once I put the web browser control into a tab pane it looses the ability to navigate after a point.
Just after creation of the browser control it is possible to navigate to a web site. If any other windows come up the result is a COMException with the "Requested resource is in use" message (stack trace below).
I had heard something about this kind of problem but hadn't seen a solution, and also heard that it was likely to be possible with version 1.1 of the framework. Having tried it with both the 1.0 and 1.1 frameworks, I was wondering if anyone had encountered and fixed similar problems.
Thanks in advance
Unhandled Exception: System.Runtime.InteropServices.COMException (0x800700AA): The requested resource is in use.
at SHDocVw.IWebBrowser2.Navigate(String URL, Object& Flags, Object& TargetFrameName, Object& PostData, Object& Headers)
at AxSHDocVw.AxWebBrowser.Navigate(String uRL, Object& flags, Object& targetFrameName, Object& postData, Object& headers)