【发布时间】:2021-01-02 07:32:42
【问题描述】:
通过将其路径结尾从 =***** 更改为 =download,我可以访问位于 OneDrive 上的 .txt 文件。然后我尝试使用以下代码下载此文件:
string fileName = Android.OS.Environment.DirectoryDownloads + "/textfile.txt";
WebClient web = new WebClient();
web.UseDefaultCredentials = true;
web.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
web.DownloadFile(uslugiPath, fileName);
因此,我得到了这个 Unauthorized.Access 异常(访问下载被拒绝)。
我检查了 [This] (Xamarin : Android : System.UnauthorizedAccessException: Access to the path is denied) 主题和许多其他主题,但没有找到解决方案。
Permissins.CheckStatusAsync
API 29
【问题讨论】: