Question

I'm using the Windows Forms WebBrowser control, and getting it to display a document that I create on the fly and set using the DocumentText property. The document that I create references a script file in the same directory as my executable. Trouble is, when the WebBrowser control displays the page, the scripts aren't enabled.

Now I know that IE7 introduced a new security feature that impacted on this scenario. I remember having to do something about setting a FEATURE_BLOCK_LMZ_SCRIPT key somewhere in the registry under the IE Key, but I can't figure out exactly where. Does anybody have instructions for this.

Even better, is there a way of enabling my Scenario without changing the registry? I don't really want to have to supply an installer with my executable.

Was it helpful?

Solution

Please check the Mark of the Web.
You will need to mark your "page". Just after the html tag, put in:

<!-- saved from url=(0020)http://www.test.com/ -->

0020 is the length of the following url (including /)

This make sure the page you are viewing will be run in the internet security zone, thus, unless set otherwise, have script enabled.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top