ブラウザでファイルが生データとして表示されていると報告しているユーザーがいます。彼は Internet Explorer を使用しています。
ファイルは .ashx ハンドラー ファイルを介して提供されており、それまでは機能していました。
これは、私の .ashx ハンドラーの関連部分です。
context.Response.Clear()
context.Response.AppendHeader("Content-Disposition", "attachment; filename=" + name)
context.Response.AppendHeader("Content-Length", size.ToString)
context.Response.ContentType = "application/pdf"
context.Response.TransmitFile(fullname)
context.Response.Flush()
HttpContext.Current.ApplicationInstance.CompleteRequest()
更新: この動作は、Windows 10 で IE 11 または Edge のいずれかを実行し、ファイルを 2 回目に開いたときにのみ発生します。.pdf ファイルと .docx ファイルの両方で発生します。