G
Guest
I am facing some problem. I uploaded some different files (jpg, bmp, doc,
pdf) into SQL Database using ASP.NET and VB.NET and I tried to download them
again. all files worked properly unless the pdf files. The download goes fine
but when I try to open them, I receive an error declaring that the file is
corrupted and can not be read or even repaired. Their sizes are less than
some of word documents I uploaded and download them later so it has nothing
to do with the size. I don't know why?
If dr.Read Then
Response.ContentType = dr("ContentType").ToString
Response.OutputStream.Write(CType(dr("FileData"), _
Byte()), 0, CInt(dr("FileSize")))
Response.AddHeader("Content-Disposition", _
"attachment;filename=" + dr("FileName").ToString())
End if
I am using Visual Studio .NET 2005 Beta 1
pdf) into SQL Database using ASP.NET and VB.NET and I tried to download them
again. all files worked properly unless the pdf files. The download goes fine
but when I try to open them, I receive an error declaring that the file is
corrupted and can not be read or even repaired. Their sizes are less than
some of word documents I uploaded and download them later so it has nothing
to do with the size. I don't know why?
If dr.Read Then
Response.ContentType = dr("ContentType").ToString
Response.OutputStream.Write(CType(dr("FileData"), _
Byte()), 0, CInt(dr("FileSize")))
Response.AddHeader("Content-Disposition", _
"attachment;filename=" + dr("FileName").ToString())
End if
I am using Visual Studio .NET 2005 Beta 1