Hi,
I work for a company in which we develop a Desktop Application that uses C# Microsoft Graph Library to download files from the OneDrive Cloud.
For the last weeks a few of our costumers are randomly getting this error in the application when they try to download files through the API:
Microsoft.Graph.ServiceException: Code: generalException
Message: An error occurred sending the request.
---] System.Net.Http.HttpRequestException: An error occurred while sending the request. ---]
System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. --->
System.IO.IOException: Unable to read data from 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 at
System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
This error occurs with random files and it gets fixed after a while, could be two minutes or two hours. We tried to find some kind of pattern on the files but we couldn't find anything. Also, we didn't make any change in the communication with OneDrive through the API for the last months so we don't understand what's happening and why we are getting this error now.
We have been using Microsoft Graph for a while now and this is the first time we are getting this error, we are starting to think that could be some problem in OneDrive servers although that seems to be unlikely because nobody else seems to have reported any issue recently apart from us.
We've replicated the error in different computers so it doesn't seems to be a problem with a particular workstation or with the local network.
We are currently using version 1.12 of Microsoft.Graph. Any help would be much appreciated cause I'm completely stuck with this.