所请求的资源是在使用中。 (从HRESULT异常:0x800700AA) [英] The requested resource is in use. (Exception from HRESULT: 0x800700AA)

查看:1881
本文介绍了所请求的资源是在使用中。 (从HRESULT异常:0x800700AA)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我该如何解决这个错误的请求的资源在使用中(从HRESULT异常:0x800700AA)。这显示虽然使用C#.net WebBrowser控件导航到不同的网站。可我知道为什么吗?谢谢

How can i solve this error " The requested resource is in use. (Exception from HRESULT: 0x800700AA)". This appear while navigating to different website using WebBrowser control in C#.net. can i know why? Thanks

推荐答案

WebBrowser控件被认为是使用,如果任何一个导航操作正在处理,还是从控制的任何模块化的对话框中为当前打开的(包括上下文菜单,JavaScript警告,NTLM登录对话框,等等)。您可以使用 WebBrowser.IsBusy 属性来检测这些状态。

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.

如果由于当前不完整的导航动作,你可以尝试停止当前导航(如果你确实想停止网页时未完成加载),或添加新的导航到一个请求队列,并使用定时器等待直到 WebBrowser.IsBusy 返回false。

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.

如果不是占线状态是由于一个或多个打开的对话​​框阻止,你可以做同样的等待技术也许的MessageBox.show()用户消息,待处理的导航由于延迟到一个开放的对话窗口。

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.

这篇关于所请求的资源是在使用中。 (从HRESULT异常:0x800700AA)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆