Click here to Skip to main content
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 0: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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 886
1 OriginalGriff 390
2 CPallini 255
3 Volynsky Alex 205
4 Richard Deeming 175
0 OriginalGriff 5,540
1 Sergey Alexandrovich Kryukov 4,668
2 CPallini 4,540
3 George Jonsson 3,102
4 Gihan Liyanage 2,445


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2014
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