Click here to Skip to main content
11,437,816 members (49,851 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WinForm webbrowser
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 15-Jan-13 1:05am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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");
    }
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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  

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



Advertise | Privacy | Mobile
Web04 | 2.8.150506.1 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100