IE Save Dialog Security Warning

  • Thread starter Thread starter Charles Mifsud
  • Start date Start date
C

Charles Mifsud

Hi all,

We have an asp.net 2.0 page with a button.
On clicking the button we redirect to another page which downloads a file.

When we deploy on the web server we are gretting a security warning saying that
"Internet Explorer blocked this site from downloading files to your computer. click here for options".

Our code is as follows:

Response.Buffer = false;
Response.BufferOutput = false;
Response.Clear();
Response.AppendHeader("Content-Disposition", "attachment; filename=" + filename + "");
Response.ContentType = "application/zip";
Response.WriteFile(filepath);
HttpContext.Current.ApplicationInstance.CompleteRequest();

How can we avoid this security warning and get the save dialog directly?

Any Ideas?

Thanks in advance

Charles Mifsud
 
Charles Mifsud napisał(a):
Hi all,

We have an asp.net 2.0 page with a button.
On clicking the button we redirect to another page which downloads a file.

When we deploy on the web server we are gretting a security warning
saying that
*"Internet Explorer blocked this site from downloading files to your
computer. click here for options"*.

Our code is as follows:

Response.Buffer = false;
Response.BufferOutput = false;
Response.Clear();
Response.AppendHeader("Content-Disposition", "attachment; filename=" +
filename + "");
Response.ContentType = "application/zip";
Response.WriteFile(filepath);
HttpContext.Current.ApplicationInstance.CompleteRequest();

How can we avoid this security warning and get the save dialog directly?

Any Ideas?

Yep.
It's nothing you can do with it in ASP.NET.
It's browser's setting and only browser's user (or network
administrator) can turn it off.
 
Why when you are downloading something from the microsoft site the warning
comes on the save dialog but the yellow bar with the security warning does
not come?

We would like to remove the yellow bar warning underneath the address bar
saying click here to download.

Thanks in advance

Charles
 
Back
Top