box api - Upload api fails and throws below exception when file is more than 3MB -


i having issue box-sdk (https://github.com/box/box-windows-sdk-v2) upload api. issue : when try upload large file (more 3mb) (file less 3mb works great.) upload api fails , throws below exception.

error :

tostring : system.aggregateexception: 1 or more errors occurred. ---> system.threading.tasks.taskcanceledexception: task canceled. --- end of inner exception stack trace --- @ system.threading.tasks.task`1.getresultcore(boolean waitcompletionnotification) @ xxxx.program.d__34.movenext() in d:\gaurav\tfs\xxxx\xxxx\program.cs:line 319 ---> (inner exception #0) system.threading.tasks.taskcanceledexception: task canceled.<---

stacktrace :
@ system.threading.tasks.task`1.getresultcore(boolean waitcompletionnotification) @ xxxx.program.d__34.movenext() in d:\gaurav\tfs\xxxx\xxxx\program.cs:line 319

innerexception : system.threading.tasks.taskcanceledexception: task canceled. time : 2014-05-28 04:55:59 pm

code generating error :

using (task<boxfile> uploadtask = boxclient.filesmanager.uploadasync(boxfilerequest, spstream)) {     boxfile newfile = uploadtask.result; } 

try use timeout parameter in uploadasync method:

boxfile = client.filesmanager.uploadasync(req, fs, null, new timespan(1, 0, 0)).result; 

Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -