Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Request was aborted: The request was canceled (dotnet upload) #4

Open
GoogleCodeExporter opened this issue Jan 28, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create new console project
2. Paste in upload_video.cs and add references
3. Upload video that takes longer than about 100 seconds to upload

What is the expected output? What do you see instead?
Expect video to upload and status to update
Instead is says an error has occured - exception listed below

What version of the product are you using? On what operating system?
Sample code changed on Apr 19, 2013
Using google-youtube-v3-rev52-csharp-1.3.0-beta, and sample helper from 
google-api-dotnet-client-1.3.0-beta.samples
Windows 8 x64
Visual Studio 2012 Update 2

Please provide any additional information below.

 An error has occured:
    The request was aborted: The request was canceled.

 Press any key to display the stacktrace

 System.Net.WebException: The request was aborted: The request was canceled.
   at System.Net.ConnectStream.InternalWrite(Boolean async, Byte[] buffer, Int32
 offset, Int32 size, AsyncCallback callback, Object state)
   at System.Net.ConnectStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at Google.Apis.Upload.ResumableUpload`1.SendChunk(Stream stream, Uri uri, Int
64 position) in c:\code.google.com\google-api-dotnet-client\default_release\Tool
s\BuildRelease\bin\Debug\output\default\Src\GoogleApis\Apis\Upload\ResumableUplo
ad.cs:line 450
   at Google.Apis.Upload.ResumableUpload`1.Upload() in c:\code.google.com\google
-api-dotnet-client\default_release\Tools\BuildRelease\bin\Debug\output\default\S
rc\GoogleApis\Apis\Upload\ResumableUpload.cs:line 313
   at TestApp1.upload_video.<>c__DisplayClass3.<Main>b__2() in c:\Users\Adam\App
Data\Local\Temporary Projects\TestApp1\Program.cs:line 66
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionCo
ntext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, C
ontextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, C
ontextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

 Press any key to exit

Original issue reported on code.google.com by [email protected] on 26 May 2013 at 10:16

@GoogleCodeExporter
Copy link
Author

Added the following line to get it working, but it is uploading very slowly.  
About 7KB/s

videosInsertRequest.ChunkSize = 10000;

Original comment by [email protected] on 26 May 2013 at 11:10

@GoogleCodeExporter
Copy link
Author

Where did you add that line?

Original comment by [email protected] on 30 Sep 2014 at 2:36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant