In our ASP.NET web site we have developed an aspx page that allows the user to download a file. The file path is sent as a parameter and then the file contents are read and written to the response stream. The code that we have used is the following:
Everything works as expected in our development environment, but when we use this piece of code in our production server, we noticed that when trying to download almost all kind of files, nothing happens in the browser. It just opens a new window for that aspx page, but then it gets closed almost inmediately. It is very weird since we have tried downloading .pdf, .doc, .xls, .txt and image files with no luck, except with some (not all) .msg files.
We have being looking for a clue sniffing the HTTP traffic that reach to the browser with Fiddler, but we have seen nothing strange. In all cases the file contents are sent to the browser with no differences, so it seems that it is the browser doesn´t show the open/save/cancel dialog. Here is a sample of the headers received in the browser with a failing file:
HTTP/1.1 200 OK Proxy-Connection:
Keep-Alive Connection: Keep-Alive
Content-Length: 421395 Via: 1.1
IBISA01 Date: Wed, 26 Jan 2011
12:02:54 GMT Content-Type:
application/octet-stream Server:
Microsoft-IIS/7.5 Cache-Control:
private Content-Disposition:
attachment;filename=P08-0656 Interflex
Especificación Inteface SGA ERP
Version 0.1.pdf X-AspNet-Version:
4.0.30319 X-Powered-By: ASP.NET
And these are the headers of a file that can be downloaded:
HTTP/1.1 200 OK Proxy-Connection:
Keep-Alive Connection: Keep-Alive
Content-Length: 290816 Via: 1.1
IBISA01 Date: Wed, 26 Jan 2011
12:03:29 GMT Content-Type:
application/octet-stream Server:
Microsoft-IIS/7.5 Cache-Control:
private Content-Disposition:
attachment;filename=Acalaracion final
Fichero ascii proveedores
Interflex.msg X-AspNet-Version:
4.0.30319 X-Powered-By: ASP.NET
In all cases, the full contents of the file appear after the headers with apparently no problems related to encoding. We are wondering if there is some possibility to debug or trace the Internet Explorer activity to see why is rejecting to download the files. The web server has Windows Server 2008 R2 and IIS 7.5. The browsers that we are using are IE 8.0 over Windows 7.
This works for Firefox and Chrome but I'm just presented with a blank screen in Internet Explorer. Why?(I've tried setting the "Content-Disposition" header. If I set it to "attachment" I am presented with the download dialog. If I set it to "inline", I just get a blank page like before.
This works for Firefox and Chrome but I'm just presented with a blank screen in Internet Explorer. Why? (I've tried setting the "Content-Disposition" header. If I set it to "attachment" I am presented with the download dialog. If I set it to "inline", I just get a blank page like before. I want the wav file to play inline like here: [URL]
well actually i dont know really if this is MVC or not but I run this on MVC so i would run it here.I got a HUGE .js file , which run smoothly on Firefox , but internet explorer read like half of him (he makes some actions , some not)
also he doenst run alert("bla"); when i put it on him.other then that, when i copy and past the code to the head of the asp.net mvc view , it runs smoothly
here is my import from the head <script src="Scripts/AppScripts/TestsAdministrator.js" type="text/javascript"></script> (also tried to do this with resolveURL);
and here is the function which some part of it doenst work (i wont type all the code unless you really want)
//Ajax - Drop down list event $("#TestList").change(function () { [code]....
i have a few calls however when i type in the URI into the address bar in internet explorer it prompts me to save the file. However google chrome displays it automatically in the browser page. Does anyone know why this would occur, here is an example of one of my calls;
I get the following error when downloading excel file in SSL site:
Internet Explorer cannot download xxxx.aspx from mysite.com. Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
After googling, I suspect that it's the problem of the response header. I try the solution in this page and set the header:
when i test this page http://www.catalogues4u.com.au/ViewCategory.aspx?catID=119 im getting the above error. to replicate this issue visit the above page in ie7 and you will get the prompt.
I am maintaining a web application that allows word template documents do be opened inside the browser.
Recently the client upgraded to windows 7 and MS Word 2007 and my problems started... When a template document is opened inside the browser and saved, the original file is overwrited instead of a new word file being created.
Is there a way to force ms word inside the browser to behave the same as when it runs outside the browser?
i m creating asp.net Mobile website page to download symbian .sis file to mobile ,but its not geting download properly.its working perfectly on desktop.
i have one application that is deployed in IIS at Remote Desktop. if i access that application from local system i am getting "Internet explorer cannot display the webpage" and it is running fine in Remote Desktop but not in Local system.
The newdomain.com is trying to place cookies in the browser and IE dosent like that. I have no control over the application hosted on the newdomain.com. I have read a lot of articles which talk about having a P3P information added to the header of the page which hosts the iframe. So in my application's Global.asax I have the following code:
I am trying to write an app in asp for users that will run in the browser but not look like a browser so I want it to open without all the toolbars. So it should be just the Title bar then the page. We will create a shortcut to the page on the users desktops. Is there a way to do this?
I am currently write an ASP.NET WebApplication in Visual Studio 2010. My default browser is Firefox. If I start an WebApplication, the WebApplication starts up in the same instance of Firefox. How is it possible to avoid it? How do I configure Visual Studio that the WebApplicaton starts in an new instance of Internet Explorer?
I am currently building a web project in which I would like to allow the user to navigate using either the back/forward button I created or the back and forward buttons in Internet Explorer to navigate my project.
I have developed some aspx pages using visual studio 2008. I am authenticating using Active Directory services. I have kept a link button on my aspx page which says signout .What exactly i want to do is that i want the back button of my login page to be disabled so that when i press signout and when my login page loads users cant go back and thus forced to enter the login details. I am using c# as development language.
we want to have a button on the page of our internet explorer that saves the flash that is displayed/loaded in the browser window. A saving dialogue after pressing the button would be great.