سؤال

I'm building WPF app using a WebBrowser control. The app runs a mini web server (via HttpListener) on a localhost port, and the WebBrowser points to it.

When the app starts on Windows7/IE9, there's a security warning at the top of the WebBrowser: "Intranet security settings are now turned off by default. Intranet settings are less secure than Internet settings. Click for options..."

I would like my app not to show that message. Can I do that? If so, how?

هل كانت مفيدة؟

المحلول

Thanks to safetyOtter, I just added this code to fix the problem:

string key = @"Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\localhost";
RegistryKey localhost = Registry.CurrentUser.CreateSubKey(key);
localhost.SetValue("http", 1);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top