Forum Discussion
SharePoint CSOM - Unable to read data from the transport connection: An existing connection
I'm extracting files from SharePoint per iteration. It runs for about 10 iterations, then I get the same exception as mentioned.
- dscoreAug 18, 2021Copper Contributor
DonHeuvelman, did you ever get a solution?
- DonHeuvelmanAug 19, 2021Copper Contributor
dscore Yeah, sort of, we put the whole request in a loop and append a sleep to it.
So we can request multiple times at once, about 10 or 11. Whenever a following request fails with the given exception, you have to wait until the previous connection is closed and this takes a few seconds, we just wait in the thread and continu after a few seconds (we try again until it succeeds)
Elegant? Not at all.. but its sufficient enough for our goals. (if it looks stupid but it works.... it's not stupid .. well not really but you get the point 😉 )
- JasonEadesAug 18, 2021Copper Contributor
DonHeuvelman Do you get the problem if you slow the process down? Maybe put some sleep operations in at the end of each iteration. If not TLS related, perhaps SP is throttling you?