System.Net.Http.HttpRequestException: Intermittent Error while Copying Content to a Stream #2608
Labels
status:waiting-for-triage
An issue that is yet to be reviewed or assigned
type:bug
A broken experience
Describe the bug
We are encountering an intermittent issue with the "System.Net.Http.HttpRequestException" while copying content to a stream. The error message is as follows:
System.Net.Http.HttpRequestException: Error while copying content to a stream. —> System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. —> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host.
Expected behavior
I am encountering an intermittent issue with the "System.Net.Http.HttpRequestException" while copying content to a stream. The below code has been used to upload a file to SharePoint embedded using Graph SDK.
How to reproduce
We are encountering this error intermittently when uploading files larger than 1.5 GB in a loop.
SDK Version
5.34.0
Latest version known to work for scenario above?
No response
Known Workarounds
We are able to upload the same set of files using Graph API. The code snippet has been enclosed below.
Debug output
Click to expand log
```The text was updated successfully, but these errors were encountered: