Connecting Tech Pros Worldwide Forums | Help | Site Map

Force Download of wmv-file

luigi.zala@freesurf.ch
Guest
 
Posts: n/a
#1: Nov 19 '05
Hello experts,
I try to force a Download of a wmv file. The script works with all
others file but not wich wmv. Windows Media Player alert me that the
file is corrupt.
Where is the bug???

Here my script:

Response.Buffer=true

dim MyFilename, adoStream
MyFileName = request.querystring("File")

Set adoStream = CreateObject("ADODB.Stream")
adoStream.Open()
adoStream.Type = 1 'adTypeBinary
adoStream.LoadFromFile Pfad

Response.ContentType = "video/x-ms-wmv"
response.addheader "Content-Disposition","attachment; filename=" &
MyFileName

Response.BinaryWrite adoStream.Read()
adoStream.Close
Set adoStream = Nothing
Response.end

Thanks a lot for your help!


Closed Thread