Reputation: 21
I am trying to upload files to sharepoint with a uploadsession, https://learn.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0 It works -i create the uploadsession - and with the received url i upload the file. but it only works some minutes in a hour. Creating and receiving the data for the uploadsession is no problem but uploading the file i get for the most time the error: The underlying connection was closed: An unexpected error occurred on a send.
StackTrace: 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. -
I dont think its TLS1.2 related because it sometimes works?
Upvotes: 1
Views: 3165
Reputation: 3655
It could be TLS1.2 related. The similar issue was discussed here: https://github.com/pnp/pnpframework/issues/336. Windows 2012 R2 and worked intermittently.
Make sure the server supports one of supported cyphers:
Upvotes: 0