Customizing (disabling) security settings for IE control

巧了我就是萌 提交于 2019-12-25 08:02:37

问题


I have a job that takes screen shot of a website on a given URL. IE control is instantiated inside the job (which is a console app). However the pages are not rendered correctly the security settings of the server on which the job is running. I found in some answers taht security settings can be controlled by IInternetSecurityManager.

I created a class that inherits from WebBrowser class and implements this interface and a couple of others similarly to the way it is done here. But this didn't solve my problem. Does this interface requires some activation or a special call in order to influence the behavior of the control.

Shortly I need somehow to customize security settings for the IE control.


回答1:


IE Enhanced Security Configuration is not something that can be disabled in code as far as I know. I think it can only be disabled on the server or via Group Policy.

It is designed to be an ultra-restricted environment for web browsers running on servers, and it is enabled for all users by default IIRC.

Your choices are: disable it on the server (or via group policy), or add the target site to the list of trusted sites in IE. I think a trusted site works normally, even under IE ESC.



来源:https://stackoverflow.com/questions/9380870/customizing-disabling-security-settings-for-ie-control

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!