Win Forms Web Browser对象导致应用程序崩溃 - VS2008 [英] Win Forms Web Browser Object Causes Application to Crash - VS2008
问题描述
我的其中一个表格中有一个网络浏览器对象。
我打开表单并尝试加载此URL ....'''http://www.bbc.co.uk/news/world/''应用程序崩溃。
当应用程序编译并安装在另一台机器上并加载上述URL时,会发生同样的事情。
但如果我尝试加载'' http://www.fsbonline.co.uk''以相同的形式,应用程序不会崩溃。
如果我尝试加载页面,会发生同样的事情在Visual Studio 2008环境中; BBC崩溃,但FSBonline.co.uk很好。
我正在加载页面...... WebBrowser1.Navigate(http://www.bbc .co.uk / news)。
直到一个月前我没有问题。
操作系统 - 安装Windows 7 64位和IE9
有没有人有任何想法?
提前致谢,
将
Hi,
I have a web browser object in one of my forms.
When I open the form and try and load this URL .... ''http://www.bbc.co.uk/news/world/'' the application crashes.
The same thing happens when the application is compiled and installed on a different machine and the above URL is loaded.
But if I try and load ''http://www.fsbonline.co.uk'' in the same form the application does NOT crash.
The same thing happens if I try and load the pages within the Visual Studio 2008 environment; crashes for BBC but good for FSBonline.co.uk.
I am loading the page like so... WebBrowser1.Navigate("http://www.bbc.co.uk/news").
Up until a month or so ago I had no issues.
Operating System - Windows 7 64 bit and IE9 installed
Does any one have any ideas?
Thanks in advance,
Will
推荐答案
它适用于我 - 我放置了一个WebBowser在我的表单上,添加了一个按钮,并将您的代码行粘贴到Click事件处理程序中:
It works fine for me - I placed a WebBowser on my form, added a button, and pasted your line of code into the Click event handler:
void button1_Click(object sender, EventArgs e)
{
webBrowser1.Navigate("http://www.bbc.co.uk/news");
}
点击按钮,页面很少,我的应用程序很好。
检查你的WebBrowser事件处理程序 - 你可能有那里有一个问题,或者是不相关的代码。
Click the button, the page laods, my app is fine.
Check your WebBrowser event handlers - you may have a problem there, or in unrelated code.
对于回复延迟表示抱歉。
我把代码放好了它在一个新项目中。
问题似乎与初始项目有关。
在最后我创建了一个新项目并复制了所有文件。
这似乎治好了。
我必须这样做有点令人不安。
非常感谢你的帮助。
Apologies for the delay in replying.
Your code worked fine once I put it in a new project.
The issue seemed to be with the initial project.
In the end I created a new project and copied all the files across.
That seemed to cure it.
Slightly disconcerting that I had to do this.
Many thanks for your help.
这篇关于Win Forms Web Browser对象导致应用程序崩溃 - VS2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!