0

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.

Community
  • 1
  • 1
Eugeniu Torica
  • 7,484
  • 12
  • 47
  • 62

1 Answers1

2

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.

Rob Levine
  • 40,328
  • 13
  • 85
  • 111
  • The problem is that if I have a new Url I need to add it manually to the trusted sites. Isn't it possible to override some security behavior for the IE control? – Eugeniu Torica Feb 21 '12 at 16:14
  • 1
    I think the answer is no if you are running this on a server. The whole idea behind this is to make it very difficult for sinister code or websites to be able to hijack the server - I'm not sure you'll be able to find a code solution - or the very idea of IE ESC would be flawed. Is it not possible to arrange for it to be disabled by the server's sysadmin, at least for standard users? – Rob Levine Feb 21 '12 at 16:18
  • Well it's not that it is impossible but we a trying to keep all machines with standard settings as much as possible in case we need replication, back up or anything else. Thank you very much for your answers – Eugeniu Torica Feb 21 '12 at 22:07