Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to avoid security message in IE7 when starting a file download?

Tags:

c#

asp.net

The message reads:

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

I am receiving this error when I try to initiate a download after successfully filling a CAPTCHA in my ASP.NET (C#) website.

Has anybody faced this issue earlier? If so can you please let me know how you have tried to make it work. I have no option to remove the AJAX calls in my code.

This issue seems to be specific to IE7. The work around suggested for this issue by Microsoft is:

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.

I even tried to create a button dynamically and trigger a click after my AJAX call is completed. Even then the issue is not resolved.

like image 956
Badarinath Pennati Avatar asked Nov 13 '22 17:11

Badarinath Pennati


1 Answers

Try this

To stop the information bar from blocking file and software downloads

Open Internet Explorer by clicking the Start button , and then clicking Internet Explorer.

Click the Tools button, and then click Internet Options.

Click the Security tab, and then click Custom level.

Do one or both of the following:

To turn off the Information bar for ActiveX controls, scroll to the ActiveX controls and plug-ins section of the list, and then, under Automatic prompting for ActiveX controls, click Enable.

To turn off the Information bar for file downloads, scroll to the Downloads section of the list, and then, under Automatic prompting for file downloads, click Enable.

Click OK, click Yes to confirm that you want to make the change, and then click OK again.

like image 69
Adnan Bhatti Avatar answered Dec 23 '22 09:12

Adnan Bhatti