Enable Chunked Transfer Encoding in ASP.NET

我的梦境 提交于 2019-12-08 01:08:15

问题


I have an ASP.NET 3.5 website residing on IIS7. I am using dynamic compression and wanted to see if I can enable chunked encoding. Is there some setting on IIS or web config that enables it?


回答1:


In my experience, calling Response.Flush() will set the Transfer-Encoding to chunked. And actually I think setting Response.BufferedOutput will set it to chunked everytime Response.OutputStream is flushed.

That is unless a Content-Length has been set, then it just flushes the output without setting chunked.




回答2:


If you edit the IIS configuration you can set the <asp enableChunkedEncoding /> element / attribute to set this.



来源:https://stackoverflow.com/questions/2277704/enable-chunked-transfer-encoding-in-asp-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!