|
| Windows media player fails when server ASHX page inline |
 |
Thu, 3 Apr 2008 21:16:02 +0000 |
I have an ashx page to serve up *.wav files.
Works fine if I mark the content-disposition as attachment. I get the prompt,
open or save the file, and Windows Media Player plays it. This code
works:context.Response.ContentType = "audio/wav";
context.Response.AddHeader("Content-Disposition", "attachment;
filename=interview.wav");
context.Response.WriteFile(fileName);
But, if I mark content-dispostion as inline, Windows Media Player throws an
error: Windows Media Player cannot play the file. The Player might not support
the file type or might not support the codec that was used to compress the file.
This code breaks:context.Response.ContentType =
"audio/wav";context.Response.AddHeader("Content-Disposition"
, "inline; filename=interview.wav");
context.Response.WriteFile(fileName);
I've tried using both Response.BinaryWrite and Response.TransmitFile, and the
same problem occurs. Is there some trick to serving up a wav file inline?
I'm using IE 7, Windows Media Player 11.0.5721.5230.
|
| Post Reply
|
| Re: Windows media player fails when server ASHX page inline |
 |
Fri, 4 Apr 2008 15:02:12 +0000 |
This turned out to be a permissions issue, please see
http://forums.asp.net/p/1243133/2276691.aspx#2276691
|
| Post Reply
|
|
|
|
|
|
|
|
|
|