shreeharsha-hirecraft / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

Error as "Request was aborted : Request was canceled" while uploading Videos to Youtube using Youtube API #526

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

When I am trying to upload a Video of size 200MB i am getting error as "Request 
was aborted : Request was canceled".

I am using .NET (Youtube API).

I have added this 

 ((GDataRequestFactory)service.RequestFactory).KeepAlive = false;

 ((GDataRequestFactory)service.RequestFactory).Timeout = 9999999;

Even then I am getting error as "Request was aborted : Request was canceled".

Can we upload files of size more than 150MB to Youtube using Youtube API.

Please help me on this........

Original issue reported on code.google.com by tswapn...@gmail.com on 18 Jul 2011 at 3:59

GoogleCodeExporter commented 8 years ago
When uploading big files you should use the ResumableUpload component instead 
of the standard Upload method.

The YouTubeUploader sample can be used as reference:

http://www.google.com/codesearch/p?hl=en#VETFb4oZYpw/clients/cs/samples/YouTubeU
ploader/YouTubeUploader/YouTubeUploader.cs

Original comment by ccherub...@google.com on 18 Jul 2011 at 5:41

GoogleCodeExporter commented 8 years ago
Thank you for tour response.

I am using .Net Youtube API( 
http://www.google.com/codesearch/p?hl=en#VETFb4oZYpw/clients/cs/samples/YouTubeU
ploader/YouTubeUploader/YouTubeUploader.cssample ).

When I am trying to upload files, it works on my local machine but on live 
server I am getting error message as:

Cancelled. Current Pos = 0

Error was: System.Net.WebException: The remote server returned an error: (400) 
Bad Request.

   at System.Net.HttpWebRequest.GetResponse()

   at Google.GData.Client.ResumableUpload.ResumableUploader.InitiateUpload(Uri resumableUploadUri, Authenticator authentication, AbstractEntry entry)

   at Google.GData.Client.ResumableUpload.ResumableUploader.Insert(Authenticator authentication, AbstractEntry payload, AsyncData data)

   at Google.GData.Client.ResumableUpload.ResumableUploader.AsyncInsertWorker(AsyncResumableUploadData data, AsyncOperation asyncOp, SendOrPostCallback completionMethodDelegate) - The remote server returned an error: (400) Bad Request.

I have set my time out as 
 YouTubeService service = new YouTubeService(YouTubeUploader.ApplicationName, Helper.strYTUN, Helper.strDKey);
                ((GDataRequestFactory)service.RequestFactory).KeepAlive = false;
                ((GDataRequestFactory)service.RequestFactory).Timeout = 9999999;

I am attaching the files, please kindly have a look.
Please let me know where I am going wrong......

Original comment by tswapn...@gmail.com on 20 Jul 2011 at 7:32

Attachments:

GoogleCodeExporter commented 8 years ago
I noticed you opened a new issue for the same problem 
(http://code.google.com/p/google-gdata/issues/detail?id=527).
Let's keep this closed and follow up there.

Original comment by ccherub...@google.com on 20 Jul 2011 at 4:35