Click here to Skip to main content
11,716,938 members (78,579 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: WinForm webbrowser

I have a web browser object in one of my forms.

When I open the form and try and load this URL .... '' 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 '' 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

I am loading the page like so... WebBrowser1.Navigate("").

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,

Posted 15-Jan-13 0:05am
Rate this: bad
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)
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.
Rate this: bad
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.

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 449
1 OriginalGriff 265
2 F-ES Sitecore 210
3 Maciej Los 135
4 Jochen Arndt 120
0 Sergey Alexandrovich Kryukov 1,144
1 Maciej Los 509
2 OriginalGriff 505
3 Richard MacCutchan 440
4 CHill60 415

Advertise | Privacy | Mobile
Web04 | 2.8.150901.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