I'm trying to get create a page that grabs a file from a directory and streams the binary data to an embedded media player. When the following code is used on a page that acts as the URL for the embedded media player the player only plays the first 11 seconds and then stops.Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim iStream As System.IO.Stream
Dim strFile As String
Dim strFolder As String
Dim Length As Integer
'strFile = "CFD30HB1404100AD.mpeg"
'strFolder = "C:\wmdownloads"
strFile = Request.QueryString("Filename")
strFolder = Request.QueryString("Folder")
' Open the file.
iStream = New FileStream(strFolder & "\" & strFile, FileMode.Open, FileAccess.Read, FileShare.Read)
' Total bytes to read:
Length = iStream.Length
Dim Buffer(CInt(Length)) As Byte
iStream.Read(Buffer, 0, CInt(Length))
Response.Charset = "UTF-8"
Response.ContentEncoding = System.Text.Encoding.UTF8
Response.ContentType = "video/mpeg"
Response.AddHeader("Content-Disposition", "attachment; filename=&
View Complete Post