WebBrowser控件:导航到该网页已被取消 [英] WebBrowser control: Navigation to the webpage was canceled

查看:4375
本文介绍了WebBrowser控件:导航到该网页已被取消的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

设置

  • 在Windows 8中(全)片
  • 在.NET 2.0应用程序

我的工作,其中4 web浏览器控件浏览一些网页时,同时应用程序加载的项目。该网页有相同的HTML,但不同的Web服务器来了。

I'm working on a project in which 4 WebBrowser controls are navigating to some webpage simultaneously when the application is loaded. The webpages have the same HTML, but are coming from different web servers.

的问题是,一些页面显示在WebBrowser控件一个导航到网页已被取消的消息。在应用程序启动时,这只发生。我已经实现了解决方案描述这里获取状态code返回,古怪够了,这是一个200 = OK状态。

The problem is that some of those pages display a "Navigation to the webpage was canceled" message in the WebBrowser control. This only happens when the application starts. I have implemented the solution described here to get the status code returned and weirdly enough, it is a 200 = OK status.

当我再刷新页面,它突然正常工作。我有一个问题可能会被同时导航引起怀疑,但我不知道我怎么能确认。

When I then refresh the page, it suddenly works correctly. I have suspicions that the problem might be caused by the simultaneous navigations, but I have no idea how I could verify that.

任何想法?

推荐答案

好了,所以我最终烧成导航和等待它做下一个之前完成,并因为我还没有遇到过的问题。这是并不需要一个花哨的解决方案的问题,而我们没有时间去深入挖掘,所以,我们使用了。

Alright, so I ended up firing a navigation and waiting for it to complete before doing the next one and I haven't encountered the problem since. It was a problem that didn't need a fancy solution, and we didn't have time to dig deeper, so we went with that.

这篇关于WebBrowser控件:导航到该网页已被取消的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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