小编Win*_*Dev的帖子

BackgroundDownloader 系统找不到指定的文件

我使用 C# 和 Windows Phone 8.1 作为通用。

我有 BackgroundDownloader 的问题。当我启动下载器时,它给了我一个例外:

Downloading http://localhost/MySong.mp3 to MySong.mp3 with Default priority, a95c00db-738d-4e22-a456-dc30d49b0a3b


A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
Exception: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
Run Code Online (Sandbox Code Playgroud)

这是我的代码:

        private void downladButton_Tapped(object sender, TappedRoutedEventArgs e)
        {
            PumpUrl(txtUrl.Text);
        }
        async void PumpUrl(string url)
        {
            if (!string.IsNullOrEmpty(url) && CheckUrl(url))
                StartDownloadMethod(url);
            else
                await new MessageDialog("Looks like URL is invalid.\r\nPlease check your URL and try again"").ShowAsync();
        }
        public bool CheckUrl(string URL)
        { …
Run Code Online (Sandbox Code Playgroud)

c# windows-phone-8.1 win-universal-app

5
推荐指数
0
解决办法
473
查看次数

标签 统计

c# ×1

win-universal-app ×1

windows-phone-8.1 ×1