473,671 Members | 2,550 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE Save Dialog Security Warning

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.Buffer Output = false;
Response.Clear( );
Response.Append Header("Content-Disposition", "attachment ; filename=" + filename + "");
Response.Conten tType = "applicatio n/zip";
Response.WriteF ile(filepath);
HttpContext.Cur rent.Applicatio nInstance.Compl eteRequest();

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

Any Ideas?

Thanks in advance

Charles Mifsud
Aug 11 '06 #1
2 2422
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.Buffer Output = false;
Response.Clear( );
Response.Append Header("Content-Disposition", "attachment ; filename=" +
filename + "");
Response.Conten tType = "applicatio n/zip";
Response.WriteF ile(filepath);
HttpContext.Cur rent.Applicatio nInstance.Compl eteRequest();

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.

--
PP

Aug 12 '06 #2
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

"Przemek Ptasznik" <pp******@mila. wywal.to.edu.pl lwrote in message
news:eb******** **@inews.gazeta .pl...
Charles Mifsud napisal(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.Buffe rOutput = false;
Response.Clear ();
Response.Appen dHeader("Conten t-Disposition", "attachment ; filename=" +
filename + "");
Response.Conte ntType = "applicatio n/zip";
Response.Write File(filepath);
HttpContext.Cu rrent.Applicati onInstance.Comp leteRequest();
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.

--
PP

Aug 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5541
by: Richard | last post by:
Hi I'm new to ASP/Web programming so any help would be appreciated... Situation: On my web page I would like to present a link {or button} that would allow the user to download a large file. When the user clicks to start the download I would like to display the "Save As" dialog, allow the user to name a place to save the file, and then show the download progress bar while the file downloads Question: How do I make a windows "Save...
0
1461
by: Bryan Ax | last post by:
Every time I've worked with saving files from the web, I have always used code like the following to force a save dialog where a consumer can choose to open or save the file. string fileName = "somefile.xml"; Response.ContentType = "binary/octet"; Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName + ""); Response.Flush(); Response.Write(file);
5
1199
by: Patrick F | last post by:
I got a link to my .aspx page, when the link is pressed i want the user to be able to download what the .aspx sends to it. Inside my .aspx page i have a string called strPage, i want that strPage to be sent to the user as a HTML page, but instead of beeing displayed, i want the user to get Save Page button. What headers are needed for it?
4
19466
by: eewwttww | last post by:
how to save with only WebBrowser: save html+picture without dialog box? what I Have is: WebBrowser.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_PROMPTUSER, 300, 300 I don't want this code. I want same code like this: WebBrowserSaveTo("c:\html\1\",htm+pic) what I can do?
4
2571
by: Matt | last post by:
Hi, I would like to save a file locally (on the client computer) in an ASP.net application. It is like the server would return some data that the user can save to a file on his local PC. The ASP page has a text field to type in the file path directly and a "Browse..." button, that shall display a "Save as..." dialog. I tried with the FileUpload control, but this does not work, since I do not want to upload an existing file, but I want to...
3
6431
by: =?Utf-8?B?YXNkZg==?= | last post by:
Hello. I am making a web application with c# and am using this code: Response.ContentType = "application/x-excel"; Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode("あいうえお") + ".csv"); Encoding encoding = Encoding.GetEncoding("Shift-JIS"); Response.BinaryWrite(encoding.GetBytes(csvStr)); Response.End(); It works fine..the data gets saved nicely to an excel file. The user pushes the...
5
3530
by: Jon Paal | last post by:
how can I bypass the open/save/cancel dialog box and have the document requested open directly in the application associated with the file type ?
3
2598
by: Koliber (js) | last post by:
sorry for my bad english when I fire up (from my c# code) a standard "file - save as " dialog, and when chosen location is a shered local network directory, where I do have rights to create and modify files, but I do not have rights to delete one, (and do save as with my filename) then this standard windows dialog seem to create empty
0
3738
by: ppardi | last post by:
I'm developing an addin for Word 2007 and I need to determine whether a user saves a Word 2007 document in an older format (97-2003) after a save as is done. The scenario is that the user starts out with a Word 2007 document, saves that document to disk, then saves the same document in an older format If the user saves a doc in an older format, I want to turn off certain features of my add-in. I'm able to trap the save event easily...
0
8483
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8824
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6236
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5703
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4416
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2818
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.