每當我在Windows應用商店的C#代碼中的BackgroundDownloader上調用CreateDownload時,出現以下異常:Exception from HRESULT: 0x80072EE4
。我已經在我的包文件中聲明瞭所有必需的功能。使用BackgroundDownloader時HRESULT 0x80072EE4
例此代碼中斷時CreateDownload()被調用:
public static async void DownloadFile(string url){
var uri = new Uri(url, UriKind.Absolute);
FileSavePicker openPicker = new FileSavePicker();
openPicker.SuggestedStartLocation = PickerLocationId.VideosLibrary;
openPicker.FileTypeChoices.Add("Video file", new List<string>() { ".mp4" });
StorageFile file = await openPicker.PickSaveFileAsync();
if (file != null)
{
DownloadOperation downloader = new BackgroundDownloader().CreateDownload(uri, file); //BREAKS HERE
//... (rest of code)
}
}
異常這是確切的例外,我得到:
System.Exception was unhandled by user code
HResult=-2147012892
Message=Exception from HRESULT: 0x80072EE4
Source=Windows.Networking
StackTrace:
at Windows.Networking.BackgroundTransfer.BackgroundDownloader.CreateDownload(Uri uri, IStorageFile resultFile)
at Example.BlankPage1.<DownloadFile>d__1.MoveNext()
InnerException:
當我嘗試運行Windows 8.1 Background Transfer sample,我用相同的方法得到相同的異常。
當用谷歌搜索0x80072EE4
時,建議移動Temporary Internet Files可以解決問題。在我的情況下,它不起作用。
Anuthing在那InnerException? –
@HenkHolterman:不,它是空的。 – Wietze
這是一個Windows錯誤代碼,12004 = ERROR_INTERNET_INTERNAL_ERROR,「發生了內部錯誤」。那麼,應該縮小它:(WinRT是由微軟Windows組而不是DevDiv設計的,在錯誤報告中很痛苦。) –