none
后台下载报错ThrowForNonSuccess HRESULT:0x80072EFD RRS feed

  • 问题

  • 每次都会报错。

    代码如下:

    StorageFile destinationFile = await KnownFolders.PicturesLibrary.CreateFileAsync("1.rmvb", CreationCollisionOption.ReplaceExisting);
                BackgroundDownloader downloader = new BackgroundDownloader();
                download = downloader.CreateDownload(new Uri("ftp://ygdy8:ygdy8@y201.dygod.org:8005/[阳光电影www.ygdy8.com].里约大冒险2.BD.720p.中英双字幕.rmvb"), destinationFile);
                try
                {
                    await download.StartAsync().AsTask(cts.Token, progressCallback);
                }
                catch (Exception)
                {
                    Log("Download Exception.");
                }

    错误信息如下:

    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at 后台传输任务.MainPage.<Start>d__0.MoveNext() in d:\wjm\project4.5\WIN8\后台传输任务\后台传输任务\MainPage.xaml.cs:line 66


    wjm

    2014年7月3日 7:16

答案

  • 你好 wjm0102,

    我查看了一下错误代码,似乎是网络无法链接(ERROR_INTERNET_CANNOT_CONNECT)

    你能确认一下你FTP服务器中文件是否能访问到,至少在我这里访问不了,是因为我网络的原因?

    另外,关于后台下载,你还可以参考一下:如何下载文件, 你的代码看起来似乎没有什么问题。

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    2014年7月4日 3:06
    版主