如何修复"所请求的资源正在使用中。 (从HRESULT异常:0x800700AA)QUOT; [英] How to fix "The requested resource is in use. (Exception from HRESULT: 0x800700AA)"

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

问题描述

我该如何解决这个问题?

How can I solve this error?

的请求的资源正在使用(从HRESULT异常:0x800700AA)。

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

这同时使用C#.NET WebBrowser控件导航到不同的网站出现。为什么呢?

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

推荐答案

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)QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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