这是我到目前为止从查看其他答案得到的结果,但仍然收到错误
“请求的站点不可用或找不到。请稍后再试。”
注意:这适用于其他浏览器和没有 https 的 IE8。
Response.ClearHeaders();
Response.Clear();
Response.AddHeader("Cache-Control", "no-store, no-cache");
Response.ContentType = "application/pdf";
Response.AddHeader("Content-Disposition",
"attachment; filename=" +
"Application.pdf");
Response.BinaryWrite(memoryStream.ToArray());
ApplicationInstance.CompleteRequest();