Now I cant turn on Failed Trace Logging for 200 because it will result in massive files.īoth of above problems were solved by increasing MinBytesPerSecond and as well as disabling Sessions, I have added detailed answer summarizing every point. However I have noticed that whenever IIS logs 64 sc-win32 error, IIS records HTTP Status as 200 but there was some error. I know I can enable unsafe header parsing but that is not the point, when it is my HTTP Handler that is sending proper headers, dont know why IIS is sending anything extra (checked on firefox and chrome, nothing unusual), this happens only 2% of times.įound sc-win32 64 error and I read somewhere that WebLimits for MinBytesPerSecond must be changed from 240 to 0, still everything is same. WebClient throws WebException saying "The server committed a protocol violation. 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. IIS closes connection for some reason, on client side in WebConfig, I receive 0 bytes for the file which is not zero bytes, We do SHA1 hash check, this told us that in IIS web server, no error is recorded. Is there anyway to trace WebClient failure? Section=ResponseStatusLine", I have another program that downloads content from the webserver which uses WebClient, and which gives this error 4-5 times a second, on an average I have 5% of requests failing. Turning Recycling still did not offer much but I have increased my MaxWorkerProcess to 8 and I now get less number of errors then before.īut on an average, out of 200 requests in one second, 2 to 10 requests fail., and this happens on almost every alternate seconds.Ĭontinuing 5% of requests failing with "The server committed a protocol violation. Access-Control-Allow-Headers:*Īccess-Control-Allow-Methods:POST, GET, OPTIONSĬontent-Disposition:attachment filename="24.jpg" I found following headers in Firefox/Chrome, nothing seems unusual here for Protocol Violation or Bad Header. Is there anyway I can force Response to send 100 continue and not let anyone close the connection? 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. I guess what is happening is, IIS does not send anything called 100 continue when we dont do buffering and client might disconnect not expecting any output. This happens 5 to 10% of all requests, not every requests. 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. Response.AddHeader("Content-Length", file.Length) This results in immediate start, however end client (typical browser like Chrome) does not know Content-Length as IIS does not know either, so it does not display progress, instead it says X KB downloaded.īuffering Off, Manual Content-Length, Fast Start, Progress and Protocol Violation Response.BufferOutput = False 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.īuffering Off, No Content-Length, Fast Start, No Progress Reponse.BufferOutput = False This results in very slow start of file, as user downloads and even progress bar does not appear till few seconds, typically 3 to 20 seconds, reason behind is, IIS reads entire file first, determines the content-length and then begin the file transfer. And I face following problems,įiles are of average size 4 to 100 MB, so lets consider 80MB file download case.īuffering On, Slow Start Response.BufferOutput = True I have an handler, where I have to deliver big files to client request. Upgraded our IIS to 7 and we are running app pool in pipeline mode and Running file till IIS 6 where we ran our app in classic mode, now we I am not looking for any alternative of streaming file contents fromĭatabase, indeed I am looking for root of the problem, this was
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |