DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Problem with Browser object in C#  (Read 8,610 times)

Carl00

  • Participant
  • Joined in 2008
  • *
  • Posts: 8
Problem with Browser object in C#
« on: July 18, 2008, 02:30 PM »
OK.. i have a weird problem.

I made a C# program which uses the Browser Object contained in .Net (i assume this creates an instance of an IE browser)

Now, it loads webpages perfectly on my PC, however when i run the program on any other pc , the browser always shows "the page can not be displayed"
Strangely though, if you use IE standalone, it works perfectly.

I even disabled all firewalls and installed the latest version of IE, but it still shows the same error message.

I dont understand this.. are there some settings required?

ps. .Net framework 3.5 is also installed on all Pcs.. program loads/works perfectly, except for teh browser part..

wreckedcarzz

  • Still lurking. Still an anthro.
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,629
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Furry Fandom Badge - Furry Fandom
    • Linux User
Re: Problem with Browser object in C#
« Reply #1 on: July 18, 2008, 08:40 PM »
Make sure you are using all needed Includes (just a thought) and that the settings for the browser are not hard coded to your PC (mistakes happen)... :-\ just some thoughts (I do VB .NET, not C#, but same OOP system),

And yes, it uses the version of IE present on the computer.

Carl00

  • Participant
  • Joined in 2008
  • *
  • Posts: 8
Re: Problem with Browser object in C#
« Reply #2 on: July 19, 2008, 03:22 AM »
I haven't coded in any extra settings / properties.. its just the default browser object. All im doing is navigating using the inbuilt webbrowserobj.Navigate("www.blahblah.com" ); function


What includes? I assumed everything would be in the .net framework? Am I missing something?

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,888
    • Participated in NANY Challenge Six Times
    • Coding Snacks
    • Gathering Badge
    • Cody Award
    • Volunteers/Staff
Re: Problem with Browser object in C#
« Reply #3 on: July 19, 2008, 11:15 AM »
Not sure how you are transferring the files to another pc, but try this:

  • Right click the .exe file in Explorer and select properties.
  • See if there is a button that says "Unblock" right below the Advanced button on the General tab.
  • If there is, click it and then click Apply and then OK.
  • Try your file again and see if it works.

If that doesn't work, make sure there isn't a "#" character in the file's path. If there is, change it.

Carl00

  • Participant
  • Joined in 2008
  • *
  • Posts: 8
Re: Problem with Browser object in C#
« Reply #4 on: July 19, 2008, 11:59 AM »
Thanks for your replies guys,
I figured out the problem though it doesnt make any sense logically..

I set the property "ScriptErrorsSuppressed" = true; and it worked fine.

Doesnt make sense why i couldnt browser at all without that, considering it worked fine on my PC.

wreckedcarzz

  • Still lurking. Still an anthro.
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,629
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Furry Fandom Badge - Furry Fandom
    • Linux User
Re: Problem with Browser object in C#
« Reply #5 on: July 19, 2008, 09:12 PM »
At least you got it resolved, though! :Thmbsup:

Original address: https://www.donationcoder.com/forum/index.php?topic=14109.0