BackgroundTransferService / Request

I have a problem (in fact, not one, but many problems),

I am developing a Windows Phone 8 application that uses BackgroundTransferService to transfer a recorded wav file, it works almost fine on HTC 8S, but it seems like strange behavior on Nokia Lumia 920, it has some incomprehensible download restrictions of 0.5 MB exactly 512 KB, with WiFi seems to be working fine, but this is a cellular issue.

var transferRequest = new BackgroundTransferRequest(new Uri(url, UriKind.Absolute)); transferRequest.Tag = DateTime.Now.ToString(CultureInfo.InvariantCulture); transferRequest.Method = "POST"; transferRequest.UploadLocation = new Uri(defect.VoiceRecordFileName, UriKind.Relative); transferRequest.TransferPreferences = TransferPreferences.AllowCellularAndBattery; transferRequest.Headers.Add("Content-Type", "audio/wav"); transferRequest.TransferStatusChanged += new EventHandler<BackgroundTransferEventArgs>(transferRequest_TransferStatusChanged); transferRequest.TransferProgressChanged += new EventHandler<BackgroundTransferEventArgs>(transferRequest_TransferProgressChanged); BackgroundTransferService.Add(transferRequest); 

when I reach TotalBytesSent = 512KB, stop loading

I check it too

 var tmp = NetworkInformation.GetInternetConnectionProfile(); var cost = tmp.GetConnectionCost(); var type = cost.NetworkCostType; 

and everything seems beautiful

EDIT:

on the server side only income 380,000 bytes +/- 5 KB

And sometimes after 10 unsuccessful attempts (when sending only 380 KB, etc.), the file uploads suddenly unload: D. Once, when I'm not in the office, it works great for the first time, and at other times it never sends.

Its a completely unpredictable thing

DECISION:

The problem was on the server side ... I had a general handler for saving this file without Range header support (I think). When I change my project to "Asp.NET Web Api Project", this tutorial inspired / copied

Its not working yesterday, but today it suddenly starts working: D Crazy Nokia and .NET.

Tomorrow we will see what happens next.

+8
c # windows-phone-8 lumia
source share
1 answer

As pointed out by IukasChudy , the solution to his problem is

The problem was on the server side ... I had a general handler for saving this file without Range header support (I think). When I change my project to the Asp.NET Web Api Project, inspired / copied by this tutorial

Today it does not work, but today it suddenly starts working: D Crazy Nokia and .NET.

Tomorrow we will see what happens next.

PS I do not like to write an answer with the content of others, but I hate unanswered questions that have already been resolved.

0
source share

All Articles