【发布时间】:2016-12-12 06:41:25
【问题描述】:
首先:这是代码:
url = "ftp://user%40site.com:pass@ipblabla51/somefile.json";
downloadOperation = downloader.CreateDownload(new Uri(url), file);
Progress<DownloadOperation> progress = new Progress<DownloadOperation>(progresschanged);
try
{
await downloadOperation.StartAsync().AsTask(backgroundDownloader.Token, progress);
/// some code
}
当我在 x86 上运行时,文件下载正常,但是当我在 ARM 设备上运行时,抛出错误: 在这一行:
await downloadOperation.StartAsync().AsTask(backgroundDownloader.Token, progress);
带代码:HRESULT E_FAIL has been returned from a call to a COM component.
但是.. 当我将 URL 更改为
"https://eu.nicehost.com/files/somefile.....dasda.json";
代码运行良好..所以问题在于 URL 解析,
%40 是一个 @ 字符。当我将其更改为@时,后台下载器无法授权ftp客户端。
那该怎么做呢?
【问题讨论】: