我正在使用WebBrowser控件构建WPF应用程序。 该应用程序在localhost端口上运行一个迷你Web服务器(通过HttpListener),WebBrowser指向它。
当应用程序在Windows7 / IE9上启动时,WebBrowser顶部会出现安全警告:“默认情况下,Intranet安全设置已关闭.Internet网络设置不如Internet设置安全。点击选项...”
我希望我的应用程序不显示该消息。 我能这样做吗? 如果是这样,怎么样?
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?
最满意答案
感谢safetyOtter,我刚刚添加了此代码来解决问题:
string key = @"Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\localhost"; RegistryKey localhost = Registry.CurrentUser.CreateSubKey(key); localhost.SetValue("http", 1);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);更多推荐
发布评论