I have an handler, where I have to deliver big files to client request. Buffering On, Slow Start Response. File is being played in video player, and it runs very very slow, however iPad only downloads fraction of file first so it works fast. AddHeader "Content-Length", file.
|Published (Last):||14 July 2018|
|PDF File Size:||14.1 Mb|
|ePub File Size:||19.64 Mb|
|Price:||Free* [*Free Regsitration Required]|
I have an handler, where I have to deliver big files to client request. Buffering On, Slow Start Response. File is being played in video player, and it runs very very slow, however iPad only downloads fraction of file first so it works fast. AddHeader "Content-Length", file. Length ; This results in correct immediate file download in Chrome etc, however in some cases IIS handler results in "Remote Client Closed Connection" error this is very frequent and other WebClient results in protocol violation.
I guess what is happening is, IIS does not send anything called continue when we dont do buffering and client might disconnect not expecting any output. However, reading files from source may take longer time, but at client side I have increased timeout but seems like IIS timesout and have no control. Is there anyway I can force Response to send continue and not let anyone close the connection?
But on an average, out of requests in one second, 2 to 10 requests fail.. Is there anyway to trace WebClient failure? This was my mistake, and its resolved as we are using Entity Framework, it was reading dirty uncommitted rows as read was not in transaction scope, putting it in transaction scope has resolved this issue.
Now I cant turn on Failed Trace Logging for because it will result in massive files. Both of above problems were solved by increasing MinBytesPerSecond and as well as disabling Sessions, I have added detailed answer summarizing every point.
Response.BinaryWrite v/s Response.Write
Subscribe to RSS
Sending and Receiving Binary Data