ashx fails to serve wav file inline

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tregan3
    New Member
    • Aug 2006
    • 8

    ashx fails to serve wav file inline

    I have an ashx page that serves *.wav files.

    If I serve them up as attachments, it works fine. This code works; I get the usual web browser prompt asking me if I want to save or open, and the file plays successfully:
    context.Respons e.ContentType = "audio/wav";
    context.Respons e.AddHeader("Co ntent-Disposition", "attachment ; filename=interv iew.wav");
    context.Respons e.TransmitFile( fileName);

    But, if I change the content-dispostion to "inline" it breaks Windows Media Player, I get an error message: "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."

    Is there some trick to serving up *.wav files inline?
Working...