I built a Windows 8.1 Universal application and I have to download some files. I use the DownloadOperation to do this task. The problem is sometimes in Windows Phone 8.1, the Download receive only zero bytes. And the same application on Windows 8.1, always download the files normally.
Bellow is my code:
BackgroundDownloader downloader = new BackgroundDownloader();
file = await ApplicationData.Current.LocalFolder.CreateFileAsync(FileName, CreationCollisionOption.ReplaceExisting);
DownloadOperation download = downloader.CreateDownload(new Uri(URL), file);
var progress = new Progress<DownloadOperation>(ProgressCallback);
await download.StartAsync().AsTask(progress);
Anyone knows how to solve it?