Re: Embed WMP Having SRC Point To ASPX Page

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



But you're *not* sending an attachment there (in that case you'd need
a content-length header too for it to work). Drop the header for
content-disposition. What happens now ?

Is this problem reproducible on other machines, or have you only
tested on one machine so far ? Does it work on your home PC ?

Cheers - Neil

On Wed, 10 Jan 2007 14:19:01 -0800, Ross Nornes
<RossNornes@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Sorry, I should have noted that upfront, but the ASPX page does set headers
for both the file content disposition and the content type as follows:

Response.AddHeader("Content-Disposition", "attachment; filename=" &
oFile.Name)
Response.ContentType = "video/x-ms-wmv"

I have tried to change the Content-Disposition to be inline as well as file
and either work in IE, both work in FireFox. I have also tried content types
"video/x-ms-wmv" and "application/octet-stream" and again neither work in IE,
but Firefox is fine with either.

Thx

Ross

"Neil Smith [MVP Digital Media]" wrote:

I can't see what headers you're sending before the file type.

Probably neither can IE6 or 7, since for all it knows the file is an
html or application/octet-stream type, rather than say video/x-ms-wmv

Since you've hidden the file location by sending just a data stream,
you have to hint the browser what the content type is by sending the
correct file headers before any content is output from your ASPX page.

HTH
Cheers - Neil

On Tue, 9 Jan 2007 18:24:00 -0800, Ross Nornes
<RossNornes@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

With ASP.NET, we can write pages that will do RESPONSE.WRITEFILE or
RESPONSE.TRANSMITFILE to force a file to be sent to the browser and it can be
used instead of URL in SRC's. Like <IMG SRC="ImgDownloader.ASPX?ID=10" />
that way the ASPX page creates some security layer so the actual image file
URL is not used thus hiding the image location the server.

Well, I'm trying to so that same thing with embedding a WMV file and IE 7
wont play it properly, but FireFox will.

Same code is:

<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/";
name="mediaplayer1" ShowStatusBar="true" EnableContextMenu="false"
autostart="false" width="700" height="570" loop="false"
src="http://www.MyDomain.Com/Downloader.aspx?MID=391"; />

Any ideas why IE is not taking this? I have not been able to test with IE 6
yet, maybe its just a 7.0 thing. I do know the Downloader.ASPX works fine
since I can download to a file fine and FireFox plays the video just fine....

Thx ahead of time!
------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs

------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
.



Relevant Pages

  • Re: Genius Wanted !!!
    ... IE renders the page header incorrectly. ... now I use Firefox! ... On a ctrl/reload ONLY the 'hyphen' named file goes awry. ...
    (soc.culture.scottish)
  • Re: Embed WMP Having SRC Point To ASPX Page
    ... repro URL and I can check it against my regular test harness boxes. ... I have also tested in both FireFox 1.5 and 2.0. ... a content-length header too for it to work). ... Digital Media MVP: 2004-2007 ...
    (microsoft.public.windowsmedia.player.web)
  • Re: file date
    ... Internet Explorer 6 and Iceweasel (Firefox) 3.5.3, ... content header values are taken straight from RFC): ... HTTP requirements for the date/time stamp format apply only ... HTML-date which is what we are normalizing to: ...
    (comp.lang.javascript)
  • Re: Header image not showing in Firefox
    ... I'm having trouble getting the header table to show up in>> Firefox. ... > with a couple of fixed images above the slideshow. ... > You should clean up the code and put the javascript in an external file> then ...
    (alt.html)
  • Re: Timesonline Archive Free Access
    ... Roger Mills wrote: ... Article box in the overlay at top right, ... Its header will usually go yellow, ... I registered using Firefox, and responded to the email to verify my email address - but cannot log on using the email address and password which I specified. ...
    (soc.genealogy.britain)