Security Level for WebBrowser control

后端 未结 1 2042
你的背包
你的背包 2021-01-05 17:21

I am trying to migrate an .hta application to a C# executable. Of course, since it\'s an .hta the code is all HTML and

1条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-05 17:42

    WebBrowser is an instance of Internet Explorer, and inherits security settings from IE.

    One way could be to change the security settings defined in IE.

    The other way could be to add a Custom Security Manager by implementing IInternetSecurityManager interface.

    The WebBrowser Control or MSHTML hosts could create a security manager (by implementing the IInternetSecurityManager interface) that handles the URL actions and policies that are important to the host. Other URL actions and policies would be passed to the default security manager so it could handle them appropriately. The IInternetSecurityMgrSite interface would be used to handle Windows-related information from the component so that the customized security manager could handle any user interface it required. -

    0 讨论(0)
提交回复
热议问题