Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.Windows.Forms.WebBrowser seems to be disabling java script?

I've got a problem with System.Windows.Forms.WebBrowser

On every machine, with the exception of one, it works fine, but on this one machine JavaScript seems to get disabled on the page that the control is trying to render.

I've gone through every system setting I can find relating to it and told it to allow JavaScript, but no dice. I can't find any information anywhere about a similar problem, and I'm completely stumped.

Pretty much any suggestions are welcomed at this point (even if it involves moving this question over to SuperUser)

To further frustrate me, the same page displays fine with javascript working when I browse to it in internet explorer - this issue only manifests when it is run from within my application.

EDIT: System is Windows Vista with latest service packs etc installed, and the page is being viewed whilst connected to a VPN

like image 889
Lee Avatar asked Jul 30 '10 16:07

Lee


2 Answers

If that computer is in a domain, the admin could have set very restrictive group policy which will forbid running JavaScript in embedded explorer frames. There's a pretty good reason for that (embedded frame is substantially more vulnerable than iexplorer.exe) and there's nothing you can really do about it.

like image 140
ZXX Avatar answered Oct 23 '22 02:10

ZXX


Be sure to check that the ScriptErrorsSuppressed property is set to false.

I've had problems where the script did not have permissions to run, and the control was suppressing pop-up windows, so it didn't tell me there was an error on the page.

like image 29
Nate Avatar answered Oct 23 '22 02:10

Nate