问题描述
我正在使用 WatiN 进行 IE 自动化项目.
I'm doing an IE automation project using WatiN.
单击要下载的文件时,我在 Internet Explorer 信息栏中看到以下内容:
When a file to be downloaded is clicked, I get the following in the Internet Explorer Information bar:
为了帮助保护您的安全,Internet Explorer 已阻止此网站从下载文件给你电脑.
为了下载报告,我可以手动将该站点添加到 Internet Explorer 的受信任站点列表中,但我更愿意在 .NET 中以编程方式检查该站点是否受信任并将其添加到列表中(如果是)不是.
In order to download the report, I can manually add the site to Internet Explorer's list of trusted sites, but I would prefer to check programmatically in .NET to see if the site is trusted and add it to the list if it is not.
仅供参考,我目前使用的是 IE7.
FYI, I'm currently using IE7.
推荐答案
查看 这个
基本上看起来好像您所要做的就是在
Basically it looks as if all you have to do is create registry key in
HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsoneMapDomainsDOMAINNAME
然后是一个名为http"的 REG_DWORD 值,值为==2
then a REG_DWORD value named "http" with value==2
这篇关于以编程方式将受信任的站点添加到 Internet Explorer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!