我正在使用下面的代码来流式传输MemoryStream对象中的pptx,但是当我打开它时,我在PowerPoint中收到修复消息,什么是将MemoryStream写入响应对象的正确方式?
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();