Changing "active content" security settings on WPF WebBrowser control Changing "active content" security settings on WPF WebBrowser control wpf wpf

Changing "active content" security settings on WPF WebBrowser control


We eventually found a decent solution to this, although I still wish there were some sort of settings on the control itself. To load the documents, we just set browser.Source to be the following:

file://127.0.0.1/c$/path/to/the/file (where the path is an absolute path without C:\, for example, c$/Users/jschuster/mydocument.html)

For whatever reason, the control will display files referenced by a URL in that format without a warning.


Hope this might help someone even that the question is a bit old ...

As per the link to "The Mark Of The Web" , adding comment like

<!-- saved from url=(0016)http://localhost -->

just under the HTML tag worked.

My index.html is in HTML folder, added as "content" set to "Always copy" in WPF project using WebBrowser control.The address to the file during execution look like this:

file:///E:/SRC_2013/WebBrowserTestApp/WebBrowserTestApp/bin/Debug/HTML/index.html


Why not insert the MOTW dynamically at the beginning of the file when you load it ?

By the way, thanks for your question : I didn't know about the "mark of the web" and it solved a problem I had :)