How to fix "The requested resource is in use. (Exception from HRESULT: 0x800700AA)"

Jepe d Hepe picture Jepe d Hepe · Feb 3, 2010 · Viewed 23.8k times · Source

How can I solve this error?

"The requested resource is in use. (Exception from HRESULT: 0x800700AA)".

This appears while navigating to a different website using the WebBrowser control in C# .NET. Why?

Answer

Sheng Jiang 蒋晟 picture Sheng Jiang 蒋晟 · Feb 10, 2010

The WebBrowser control is considered "in use" if either a navigation action is currently being processed, or any blocking dialog from the control is currently open (including context menu, Javascript alerts, NTLM login dialog, etc.). You can use the WebBrowser.IsBusy property to detect these states.

If due to a currently incomplete navigation action, you could try to stop the current navigation (if you indeed want to stop when the page is not completed loaded) or add the new navigation to a request queue and use a timer to wait until WebBrowser.IsBusy returns false.

If instead the busy state is due to one or more open blocking dialogs, you could do the same wait technique and perhaps Messagebox.Show() the user a message that pending navigation is delayed due to an open dialog window.