WebClient Download - “Access to the path 'c:\\\\windows\\\\system32\\\\inetsrv\\\\MyPrintManager.exe' is denied”

落花浮王杯 提交于 2019-12-02 09:37:24

No, it's attempting to save the file to C:\windows\system32\inetsrv\MyPrintManager.exe.

That's because C:\windows\system32\inetsrv is the working directory for your process, and you've just given a relative filename.

Specify an absolute filename which says exactly where you want the file to be stored, and it should be fine.

user2967035
WebClient web = new WebClient();
string url = "http://.../FILENAME.jpg";
web.DownloadFile(new Uri(url), "C:/FILENAME.jpg");
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!