gpt4 book ai didi

c# - 开始文件下载时如何避免 IE7 中出现安全消息?

转载 作者:太空狗 更新时间:2023-10-29 23:47:50 24 4
gpt4 key购买 nike

消息内容如下:

To help protect your security, Windows Internet Explorer blocked this site from downloading files to your computer. Click here for more options...

当我在我的 ASP.NET (C#) 网站中成功填写验证码后尝试启动下载时收到此错误。

有没有人之前遇到过这个问题?如果可以,请让我知道您是如何尝试让它发挥作用的。我无法删除代码中的 AJAX 调用。

这个问题似乎是 IE7 特有的。 Microsoft 针对此问题建议的解决方法是:

To ensure that your Web site downloads are not blocked, do not automatically launch a file download. Instead, use hyperlinks or buttons that require a user action. If you use a script to navigate to the resource, it must run synchronously within the context of the OnClick event handler for the link.

我什至尝试动态创建一个按钮并在我的 AJAX 调用完成后触发点击。即便如此,问题仍未解决。

最佳答案

试试这个

阻止信息栏阻止文件和软件下载

单击开始按钮 ,然后单击 Internet Explorer 打开 Internet Explorer。

单击“工具”按钮,然后单击“Internet 选项”。

单击“安全”选项卡,然后单击“自定义级别”。

执行以下一项或两项操作:

要关闭 ActiveX 控件的信息栏,请滚动到列表的 ActiveX 控件和插件部分,然后在 ActiveX 控件的自动提示下,单击启用。

要关闭文件下载的信息栏,请滚动到列表的“下载”部分,然后在“自动提示文件下载”下,单击“启用”。

单击“确定”,单击"is"确认您要进行更改,然后再次单击“确定”。

关于c# - 开始文件下载时如何避免 IE7 中出现安全消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7494087/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com