You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Graph 5.x Download large file over 2GB have issue
When I trying to use graph DriveItem/Content to download large file content, I see the error below.
System.Net.Http.HttpRequestException: Cannot write more bytes to the buffer than the configured maximum buffer size: 2147483647.
Stack Trace:
HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
HttpClientRequestAdapter.GetHttpResponseMessage(RequestInformation requestInfo, CancellationToken cancellationToken, Activity activityForAttributes, String claims)
HttpClientRequestAdapter.SendPrimitiveAsync[ModelType](RequestInformation requestInfo, Dictionary2 errorMapping, CancellationToken cancellationToken) ContentRequestBuilder.GetAsync(Action1 requestConfiguration, CancellationToken cancellationToken)
GraphDriveService.DownloadFileByIdAsync(String driveId, String driveItemId, RangeHeaderValue range, String eTag, CancellationToken cancellationToken) line 59
GraphDriveService.DownloadFileByIdAsync(String driveId, String driveItemId, CancellationToken cancellationToken) line 31
GraphDriveServiceTests.DownloadFileTest3() line 87
ThreadOperations.ExecuteWithAbortSafety(Action action)
To Reproduce
Use Graph SDK to download drive file over 2GB
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]
Smartphone (please complete the following information):
Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
I'm guessing you're receiving this error because the underlying HttpClient is sending the request with the default parameter of HttpCompletionOptions.ResponseContentRead meaning the entire response is buffered. I don't believe there is a way to override this so you'd need to drop back to using HttpClient directly.
Describe the bug
Graph 5.x Download large file over 2GB have issue
When I trying to use graph DriveItem/Content to download large file content, I see the error below.
System.Net.Http.HttpRequestException: Cannot write more bytes to the buffer than the configured maximum buffer size: 2147483647.
Stack Trace:
HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
HttpClientRequestAdapter.GetHttpResponseMessage(RequestInformation requestInfo, CancellationToken cancellationToken, Activity activityForAttributes, String claims)
HttpClientRequestAdapter.SendPrimitiveAsync[ModelType](RequestInformation requestInfo, Dictionary
2 errorMapping, CancellationToken cancellationToken) ContentRequestBuilder.GetAsync(Action
1 requestConfiguration, CancellationToken cancellationToken)GraphDriveService.DownloadFileByIdAsync(String driveId, String driveItemId, RangeHeaderValue range, String eTag, CancellationToken cancellationToken) line 59
GraphDriveService.DownloadFileByIdAsync(String driveId, String driveItemId, CancellationToken cancellationToken) line 31
GraphDriveServiceTests.DownloadFileTest3() line 87
ThreadOperations.ExecuteWithAbortSafety(Action action)
To Reproduce
Use Graph SDK to download drive file over 2GB
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: