IE Save Dialog Security Warning

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
 
P

Przemek Ptasznik

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.
 
C

Charles Mifsud

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top