私はbyte[]に画像を持っています。asp.netのadobeファイルで開く必要があります。私は次のコードを使用しています:
byte[] bytes = contractimage.Value.Bytes;
if (bytes == null)
{
Response.Write("Not found.");
Response.End();
}
else
{
Response.AddHeader("content-disposition",
"attachment;filename=statement" + contractGuid.ToString() + ".pdf");
Response.ContentType = "application/pdf";
Response.OutputStream.Write(bytes, 0, bytes.Length);
Response.End();
}
しかし、このコードは、adobe canotがこのファイルを表示できず、破損している可能性があるというエラーを表示します。提案してください