Exemple #1
0
        public static void DisableSecurityCheck()
        {
            IESettings.CoInternetSetFeatureEnabled(FEATURE_RESTRICT_FILEDOWNLOAD, SET_FEATURE_ON_PROCESS, false);

            IESettings.CoInternetSetFeatureEnabled(FEATURE_ZONE_ELEVATION, SET_FEATURE_ON_PROCESS, false);
            IESettings.CoInternetSetFeatureEnabled(FEATURE_WEBOC_POPUPMANAGEMENT, SET_FEATURE_ON_PROCESS, false);
            IESettings.CoInternetSetFeatureEnabled(FEATURE_LOCALMACHINE_LOCKDOWN, SET_FEATURE_ON_PROCESS, false);
            IESettings.CoInternetSetFeatureEnabled(FEATURE_PROTOCOL_LOCKDOWN, SET_FEATURE_ON_PROCESS, false);
            IESettings.CoInternetSetFeatureEnabled(FEATURE_SECURITYBAND, SET_FEATURE_ON_PROCESS, false);
        }
Exemple #2
0
        public BrowserHub(WebBrowser browser, string homePath)
        {
            _webBrowser = browser;

            IESettings.DisableSecurityCheck();
#if DEBUG
            _webBrowser.ScriptErrorsSuppressed = false;
#else
            _webBrowser.ScriptErrorsSuppressed = true;
#endif
            _webBrowser.ObjectForScripting = this;

            _client = new BrowserClient(_webBrowser);

            _webBrowser.Navigate(homePath);
        }