2

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?

Charles Merriam
  • 19,908
  • 6
  • 73
  • 83
webly
  • 327
  • 2
  • 7
  • 18
  • possible duplicate of [How can I set Transfer-Encoding to chunked, explicitly or implicitly, in an ASP.NET response?](http://stackoverflow.com/questions/2595460/how-can-i-set-transfer-encoding-to-chunked-explicitly-or-implicitly-in-an-asp) – gdoron Sep 17 '15 at 21:31

2 Answers2

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.

David Hogue
  • 1,791
  • 1
  • 14
  • 23
  • I was having a different issue, but your answer pointed me in the right direction. Thx. – guzart May 03 '11 at 21:17
  • This is not true. Calling Response.Flush() does not add the 'Transfer-Encoding' to the response headers. At least not in all asp.net versions, which version are you using ? – gillyb Aug 20 '13 at 08:43
-1

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

Kim R
  • 561
  • 2
  • 13