Http - Download .wav File Within Internet Explorer

Jul 8, 2010

I'm just trying to sent a .wav file to Internet Explorer with an ASP.net Handler:

public void ProcessRequest(HttpContext context)
{
HttpResponse response = context.Response;
response.ContentType = "audio/x-wav";
response.WriteFile("MyWav.wav");
response.AddHeader("Content-Length", "304578");
response.Flush();
}

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.

View 2 Replies


Similar Messages:

Internet Explorer - Unable To Download File

Jan 26, 2011

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:

string filepath = HttpContext.Current.Request.Params["FilePath"];
Response.Clear();
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename=" + Path.GetFileName(filepath));
Response.TransmitFile(filepath);
Response.Flush();

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.

View 3 Replies

HTTP Post Doesn't Work On Internet Explorer 8 (after Redirection)

Feb 4, 2011

I'm trying to redirect a domain to another site, without changing the first URL (users should keep viewing http://www.myurl.org since the new URL would be https://wwws.enterprisedomain.com).

I could do this, inserting a frame in the index.htm of the first domain (I know it's not the best practice, but it worked well for now):

<frame name="main" src="https://wwws.enterprisedomain.com">

The fact is that https://wwws.enterprisedomain.com has a login mechanism in ASP.NET. It's OK on Firefox and Chrome, but when we use Internet Explorer 8, it seems that POST doesn't work!

View 1 Replies

Sent .wav File To Internet Explorer With Handler

Jul 8, 2010

I'm just trying to sent a .wav file to Internet Explorer with an ASP.net Handler:

public void ProcessRequest(HttpContext context){ HttpResponse response = context.Response; response.ContentType = "audio/x-wav"; response.WriteFile("MyWav.wav"); response.AddHeader("Content-Length", "304578"); response.Flush();}

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]

View 1 Replies

MVC :: Internet Explorer Js Read Half File?

May 5, 2010

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

View 4 Replies

C# - Can't Send File From Web Application On Internet Explorer

May 27, 2010

Can't load Items.aspx from 192.168.0.172 And a text is Can't open this web-site. It can't be found. Try later

HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.Charset = System.Text.Encoding.Unicode.EncodingName;
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.Unicode;
HttpContext.Current.Response.BinaryWrite(System.Text.Encoding.Unicode.GetPreamble());
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
HttpContext.Current.Response.AddHeader(
"content-disposition", string.Format(
"attachment; filename={0}",fileName));
....
table.RenderControl(htw);
HttpContext.Current.Response.Write(sw.ToString());
HttpContext.Current.Response.End();

Trouble with this file is only for Internet Explorer (works on opera / firefox ... ) And so it works for HTML with no

HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";

this string How to avoid this error on IE ?

View 1 Replies

WCF / ASMX :: Internet Explorer Downloads JSON To A File

Nov 27, 2010

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;

[Code]....

[OperationContract]

View 1 Replies

Internet Explorer Shows Error When Downloading Excel File In SSL Site?

Mar 8, 2010

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:

[URL]

HttpContext.Current.Response.AddHeader("Pragma", "no-cache");
HttpContext.Current.Response.CacheControl = "private";

View 4 Replies

IE7 Internet Explorer Cannot Open The Internet Site, Operation Aborted

Jun 10, 2010

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.

View 3 Replies

How To Save MS Word Template File (dotx) As Docx When Document Is Opened In Internet Explorer

May 7, 2010

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?

View 1 Replies

Http File Download With IIS 7?

Sep 22, 2010

I'm having a virtual directory that holds videos of format MP4. My problem is that i'm not able to access some of the "mp4" file via http. But i can browse and play the file through the shared folder not via http. I added the MIME extension for MP4 also. Please find the event log as belowLogFaulting application w3wp.exe, version 7.0.6002.18005, time stamp 0x49e023cf, faulting module MSVCR80.dll, version 8.0.50727.4016, time stamp 0x49cc5361, exception code 0xc000000d, fault offset 0x00004e12, process id 0x2edc, application start time 0x01cb598243012abd.Also in fiddler i'm getting the log as ReadResponse() failed: The server did not return a response for this request.

View 1 Replies

VS 2008 Download File From HTTP / HTTPs

Mar 28, 2013

On my page load, I need to download a file say http://example.com/file.csv or https://example.com/file.csv to some location on my web server without prompting save as dialog box. Means it will be a download in background from some server to my server. How to do this?

View 2 Replies

Internet Explorer Cannot Display The Webpage?

Apr 6, 2010

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.

View 2 Replies

Web Forms :: How To Close Internet Explorer

Jun 6, 2010

i want to close internet explorer on if a button is closed which i can do with this code

Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "jcrCallerID", "window.close();", True)

this code is working fine for me but it is also coming up with warning which i dont want.


The warning is saying the webpage is trying to close do you want to continue closing the webpage yes /no

I want to avoide this warning and just close the browser windows.

View 3 Replies

C# - How To Add URL To The Trusted Zone In Internet Explorer

Mar 18, 2010

How can I add an URL to the trusted site? It seems that there are stored in the registry, but where exactly?

The .net programm will run locally on each client.

Edit clarification: I want to do this programmaticly running C# code.

View 5 Replies

Iframe Cookie With Internet Explorer?

Aug 23, 2010

I am developing an ASP.NET 4.0 web application in which I am trying to use an iframe to load a third party website:

<iframe id="ifr1" src="http://newdomain.com?id=test&password=123"
width="100%" height="600px">
</iframe>

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:

protected void Application_BeginRequest(object sender, EventArgs e)
{
HttpContext.Current.Response.AddHeader("p3p", "CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"");
}

But this doesn't work and I am really confused now.

View 1 Replies

Opening Internet Explorer Without Toolbars?

Feb 25, 2010

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?

View 3 Replies

Links For Firebug On Internet Explorer?

Sep 21, 2010

i want to install firebug on IE.can you give me the links for free download of firebug

View 4 Replies

C# - Start Internet Explorer On Debugging?

Jul 27, 2010

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?

View 2 Replies

Manipulating Internet Explorer Navigation Buttons?

Oct 11, 2010

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.

View 1 Replies

How To Hide Address Bar And Internet Explorer Menus

Jan 17, 2011

i have created kiosk application in asp.net and i just want to hide address bar and internet explorer menus.

View 2 Replies

Disable Back Button Of Internet Explorer?

May 9, 2010

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.

View 7 Replies

Convert Xml String To XML Document In Internet Explorer?

Jul 8, 2010

I have converted a table as an xml string that looks something like

<NewDataSet>
<officelist>
<OfficeID>2176</OfficeID>
<Office>My Office </Office>
<Region>Toronto</Region>
<Division>TO </Division>

How do I get this to a strict xml page where you can open and close the nodes (in IE) -like this xml feed

View 2 Replies

Saving Flash .swf In Internet Explorer With VB Script?

Nov 3, 2010

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.

View 5 Replies

C# - Open Internet Explorer From Google Chrome

Mar 29, 2011

I currently developing a ASP.NET web application.

The application is designed for Google Chrome. I would like to pop out IE when printing is involved because Chrome lack preview etc. at a button click the IE should open. Here's the code:

protected void btn_print_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://localhost/storeapp/printpage.aspx?orderno=" + Request.QueryString["orderno"].ToString() + "");
}

Here I have passed a particular orderno to the URL. But when I click nothing happens. I have set IE as default web browser. Why is this?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved