views:

160

answers:

3

Hi all,

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

+3  A: 

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.

ZXX
If there are some policy restriction, the same url can not be shown in the Internet Explorer, but Lee wrote in one of the comments "viewing the same page in internet explorer standalone works fine"
Oleg
Wrong - please read carefully what I wrote above. Embedded explorer frames are known security threat and can get separate treatment if corpnet admin feels like doing it. Embedded explorer frame is not the same as IE exe.
ZXX
I've had IT look at it, and there don't seem to be any group policies that would be causing this :( I think this is worth a revisit though in case they missed anything
Lee
Hope you liked Twilight Zone series :-) 2 MSDN pages talk about feature controls that can be applied at least to individual binaries and apparently to individual WebBrowser controls. The list is the same one would apply in general if it was in registy, but these are either not in registry are in places that MSDN doen't feel like mentioning - they don't state API for per-control application either: http://msdn.microsoft.com/en-us/library/aa970906.aspx
ZXX
On and if you have some time to burn, you could try playing with InvokeScript and ObjectForScripting to try to cause exception on purpose - good spew may tell who did it, especially when it's outside of .NET. The caveat is that you might need at least native debugging in VS and maybe even windbg to see exceptions and hresults which get eaten.
ZXX
Still not solved it, but this answer and the comments are the most useful (and I think my best shot at sorting it) - thanks
Lee
A: 

did you check the html content being sent on your browser control?

ajay_whiz
+2  A: 

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.

Nathan
This is on - not seeing any scripting errors
Lee