Dear Box Community,
We are currently using Box.V2 version 5.2.0 library for .NET to interact with Box documents. However, we periodically encounter the following error: “System.IO.IOException: The response ended prematurely”. This error occurs most frequently when using the GetFolderItemsAsync method, but occasionally with GetRepresentationContentAsync as well. It is important to note that this error does not occur for all folders, and after waiting and retrying the request for a specific folder, the method can execute successfully.
For our most recent run, we set a timeout of 10 minutes for the HttpRequestHandler. However, based on the logs, it is evident that for the folders where the error occurred, the connection was terminated after approximately 8 minutes
We would greatly appreciate any insights you can provide regarding the potential causes of this error, why the connection is being terminated before reaching the set timeout and any suggestions for resolving it.
Thank you for your attention to this matter. We look forward to your prompt assistance.
Good regards,
Nikita