79166151

Date: 2024-11-07 11:11:08
Score: 1.5
Natty:
Report link

I got the same "Incorrect function" (0x80070001) error from IHttpRequest::ReadEntityBody while uploading a very long binary stream. My code is in custom native IIS module written on C++. There is no ASP.NET, no ASP, nothing, except for minimal IIS and my custom IIS module. The error could occur after 100 reads or after few thousands or few hundred thousand. The buffer size does not mater. Asynchronous or synchronous reading fails the same way. The stream uses chunked encoding.

Failed Request Tracing did not reveal anything useful, so I googled for GENERAL_READ_ENTITY_START and "Incorrect function" and found this old thread.

The solution with "read ahead" setting does not help in my case although the setting is still there, hot fix is obviously not available after 11 years and OS I have is Windows Server 2022.

There is also no Session module involved in my scenario. It looks like some sort of bug is still there, the interesting thing is that the same uploading works just fine if connection uses HTTPS, the problem occurs over HTTP only. That points to the direction of the same "read ahead" buffer bug, because the stream data is being combined differently when data is being received over SSL connection, but the setting does not help me much.

I wrote here just so anyone else who hit the same problem could find this thread and maybe provide some new information.

Reasons:
  • Blacklisted phrase (1): help me
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: szz743