Response.WriteFile() giving an extra byte at the end?
From: David Union (d.union_at_verizon.net)
Date: 09/01/04
- Next message: Matt Hamilton: "XP SP2 and opening windows"
- Previous message: Rutger Smit: "Re: Problem in creating a Windows Service"
- Next in thread: Joe Fallon: "Re: Response.WriteFile() giving an extra byte at the end?"
- Reply: Joe Fallon: "Re: Response.WriteFile() giving an extra byte at the end?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 1 Sep 2004 18:03:28 -0400
Hi.
I'm posting this here because I don't know exactly what the best group is.
This is for an aspx page with Visual Basic as the code-behind page.
I am doing very simple code...
in the middle of an http request, i set a filename (with path)
and do a Response.WriteFile(filenamewithpath)
then Response.End().
I have tried Response.Clear() and .Flush() ahead of time.
I have tried various permutations (all, I think) of Content-Type
and Content-Disposition.
I have also tried opening a file stream and copying the data
to an array of bytes (the data is good in the array) and then
doing a Response.BinaryWrite(binaryarray)
then Response.End().
I've also tried Response.Close().
In all cases I get an extra byte at the end of the file,
so the CRC doesn't match up.
Anyone know the solution for this?
Windows 2000 Server, Visual Studio 2003
with the appropriate and updated framework.
Thanks,
DU
- Next message: Matt Hamilton: "XP SP2 and opening windows"
- Previous message: Rutger Smit: "Re: Problem in creating a Windows Service"
- Next in thread: Joe Fallon: "Re: Response.WriteFile() giving an extra byte at the end?"
- Reply: Joe Fallon: "Re: Response.WriteFile() giving an extra byte at the end?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|