What steps will reproduce the problem?
1. Start a background upload process (YouTubeRequest.Upload) using
Task.Factory.StartNew()
2. Use a larger file >50MB
What is the expected output? What do you see instead?
The upload starts, as indicated by the YouTube video manager. About 2 min into
the transfer, YouTube shows Failed: upload aborted. A failed exception is not
thrown to .NET, neither is it successful. I have found no way in .NET to
lengthen the time this thread is allowed to complete. It has been suggested
that .NET does not just drop tasks, and that it must be hanging while awaiting
a response. The code does work with smaller files, <10MB, but not larger ones.
What version of the product are you using? On what operating system?
VB.NET 4.0
Please provide any additional information below.
Here is the relevant logic.
'executes
cmdupdate = New SqlCommand("Update transactions set name='upload started' where
transactionid='18'", conHyperData)
Try
'executes as indicated by YouTube manager
Dim createdVideo As Video = request.Upload(vidupload)
Catch ex As Exception
'never executed
cmdupdate = New SqlCommand("Update transactions set name=@name where transactionid='18'", conHyperData)
cmdupdate.Parameters.AddWithValue("@name", "failed - " & ex.ToString)
End Try
'never executed
cmdupdate = New SqlCommand("Update transactions set name='upload finished' where transactionid='18'", conHyperData)
This routine is called like this:
Dim uploadtask As Task = Task.Factory.StartNew(Sub() begin_upload(),
TaskCreationOptions.LongRunning)
Thank you for any light you might be able to shed on this issue.
Original issue reported on code.google.com by gbus...@gmail.com on 30 Apr 2012 at 3:27
Original issue reported on code.google.com by
gbus...@gmail.com
on 30 Apr 2012 at 3:27