Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Posted

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:
C#
void button1_Click(object sender, EventArgs e)
    {
    webBrowser1.Navigate("http://www.bbc.co.uk/news");
    }
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.
 
Share this answer
 
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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900