G
gom
I am using the following code to stream a server generated pdf file to a
client. Acrobat 7 opens the file as expected but Acrobat 5,6 and 8 launch
in memory but never open. I ran the command with Fiddler running and it
tells me there is a content-length mismatch of 129 bytes between my buffer
length and what the server actually sends. I'm wondering if this is an
issue related to some additional header information or something that is
sent along with the buffer. Can anyone help me with this?
Thanks in advance.
Dim client As New System.Net.WebClient()
Dim buffer As Byte() = client.DownloadData("http://www.mywebsite.com" &
myResponseString.ToString)
If buffer IsNot Nothing Then
Response.ContentType = "application/pdf"
Response.AddHeader("content-length", buffer.Length.ToString())
Response.BinaryWrite(buffer)
End If
client. Acrobat 7 opens the file as expected but Acrobat 5,6 and 8 launch
in memory but never open. I ran the command with Fiddler running and it
tells me there is a content-length mismatch of 129 bytes between my buffer
length and what the server actually sends. I'm wondering if this is an
issue related to some additional header information or something that is
sent along with the buffer. Can anyone help me with this?
Thanks in advance.
Dim client As New System.Net.WebClient()
Dim buffer As Byte() = client.DownloadData("http://www.mywebsite.com" &
myResponseString.ToString)
If buffer IsNot Nothing Then
Response.ContentType = "application/pdf"
Response.AddHeader("content-length", buffer.Length.ToString())
Response.BinaryWrite(buffer)
End If