我正在使用以下代码来流式传输存储在MemoryStream对象中的pptx文件,但是当我打开它时,PowerPoint会显示“修复”消息,请问将MemoryStream正确写入Response对象的方法是什么?
HttpResponse response = HttpContext.Current.Response;
response.Clear();
response.AppendHeader("Content-Type", "application/vnd.openxmlformats-officedocument.presentationml.presentation");
response.AppendHeader("Content-Disposition", string.Format("attachment;filename={0}.pptx;", getLegalFileName(CurrentPresentation.Presentation_NM)));
response.BinaryWrite(masterPresentation.ToArray());
response.End();