none
Allow active content in WebBrowser control without prompt/blocking RRS feed

  • Question

  • Hello everybody,

    I have currently the following problem:
    I have a html file which is stored locally on the file system.
    A WPF application has a WebBrowser control that shall show the html page.
    The html page contains a Java-Applet that is signed and trusted.
    However, the component still refuses to load the Applet immediately and instead shows the Information Bar with following message: "To protect your security, your web browser has restricted this file from showing active content that could access your computer."
    When I then click "Allow Blocked Content..." the applet starts immediately since it is already trusted and no further prompt is shown.
    The problem is that I do not want to have the prompt/blocking for this Applet but that it runs immediately (important for syncing with external component).

    So is there any possibility that this specific page/applet is not blocked anymore?

    Thank you very much for your help in advance.
    Friday, May 15, 2009 11:16 AM

Answers

  • Hi,

    Try adding the "mark of the web" to the html page, so it looks like it's coming from the internet instead of off the local hard drive.  Add this as the first line of the .htm page:

    <!-- saved from url=(0014)about:internet -->

    Hopefully this will take care of the gold bar problem.

    Andre
    Friday, May 15, 2009 5:05 PM
    Moderator

All replies

  • Hi,

    Try adding the "mark of the web" to the html page, so it looks like it's coming from the internet instead of off the local hard drive.  Add this as the first line of the .htm page:

    <!-- saved from url=(0014)about:internet -->

    Hopefully this will take care of the gold bar problem.

    Andre
    Friday, May 15, 2009 5:05 PM
    Moderator
  • Hello Andre,

    sorry for my late reply.
    Your solution works perfectly!
    Thank you very much!
    Your answer has been already marked as solution/answer.
    Wednesday, June 3, 2009 2:11 PM
  • The above thread deals with HTML.  I have XML that I'm trying to view with the WebBrowser Control.  If I add the Mark of the Web I still get the gold bar.  If I use the same document directly in IE I don't get the gold bar.  Are there WebBrowser settings to avoid this?

    Also I would prefer to output my XML to a stream and NavigateToStream.  When I do that I don't get the gold bar but I also don't get my XML tags.  Just plain text.  Is there a way for NavigateToStream to show XML?

    Wednesday, July 7, 2010 9:34 PM
  • What kind of security feature is this, if adding this line of code turns it off? :)
    Tuesday, July 30, 2019 6:03 PM