Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 349
Jepe d Hepe Avatar asked Feb 03 '10 07:02

Jepe d Hepe


1 Answers

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.

like image 56
Sheng Jiang 蒋晟 Avatar answered Sep 17 '22 12:09

Sheng Jiang 蒋晟