windows phone 7 - Does WP background transfers support re-uploading and how it actually works? -


i'm trying implement http handler handling file upload wp background transfers. i've tried this:

            var request = new backgroundtransferrequest(@"http://computername/test.ashx")             {                 method = "post",                 transferpreferences = transferpreferences.none,                 uploadlocation = new uri(@"shared/transfers/testfile.txt", urikind.relativeorabsolute)             }; 

in case phone sends range:0- . contentlength equals actual source file size. , request stream contains data... did not know how make sending data partially. and, can not find actual info how uploading works, headers uses , on. there no specification server!

sadly, backgroundtransferrequests not support range upload or download. if don't need allow transfers when app not running, suggest writing own transfer code. can support range , can control number of concurrent transfers(and can around 2 transfer limit phone) , don't have deal various file size/network type limitations.

below documentation explaining following link: http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202955%28v=vs.105%29.aspx#bkmk_backgroundtransferpolicies

the headers property of backgroundtransferrequest object used set http headers transfer request. following headers reserved use system , cannot used calling applications. adding 1 of following headers headers collection cause notsupportedexception thrown when add(backgroundtransferrequest) method used queue transfer request: • if-modified-since

• if-none-match

• if-range

• range

• unless-modified-since


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -