Problem to download large files (hash256 and close connection remote host) #1306
Unanswered
josediazramon
asked this question in
Q&A
Replies: 1 comment
-
@josediazramon : did you consider requesting the hash from SharePoint (https://learn.microsoft.com/en-us/graph/api/resources/driveitem?view=graph-rest-1.0) using the file facet which contains a collection of hashes (https://learn.microsoft.com/en-us/graph/api/resources/hashes?view=graph-rest-1.0). Regarding the second ask: you're not using the custom created HttpClient to download the file, that's done using the standard approach in the SDK? Given this is an intermittent problem I'm suspecting this to be service issue, does the error happen around the set timeouts? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
In recent days, I have been trying to solve a problem, but I don't have any idea about what is causing it. I have an application to download all files from a SharePoint library, and for large files, I use the following code (https://pnp.github.io/pnpcore/using-the-sdk/files-large.html):
I have two problems. First, if I obtain the hash and then try to download the file, the Stream doesn't have the internal property "_connection," and there is an error because I can't download the file to the specific path. Is there a way to download the file's content, obtain the hash, and save it to C:\ without downloading the same file twice?
The second problem I have, is that sometimes when I try to download large files from a SharePoint Online site, I get this error: "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."
In my program.cs, I have a timeout set to 6,000 seconds:
In my class, I have the following:
Can anyone help me? Thank you very much.
Beta Was this translation helpful? Give feedback.
All reactions