简体   繁体   English

C#:如何从GoogleDocs下载文件?

[英]C#: How can I download the file from the GoogleDocs?

Windows 7, .Net 4.5.1. Windows 7,.Net 4.5.1。 My computer is in the domain. 我的电脑在域中。 I try to download the dll-file from the GoogleDocs: 我尝试从GoogleDocs下载dll文件:

WebClient client = new WebClient();
client.Proxy = WebProxy.GetDefaultProxy();
client.Credentials = new NetworkCredential("userName", "password");
client.DownloadFile("https://drive.google.com/file/d/0B7H_2Cq9tBXdWkU0andsR1dWM0U/view?usp=sharing",
  fileName);

But I get an exception with the message: 但是我收到了一条消息:

The remote server returned an error: (407) Proxy Authentication Required. 远程服务器返回错误:(407)需要代理身份验证。

How can I fix it? 我该如何解决?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用C#下载XML文件? - How can I download an XML file using C#? 如何使用c#从LiveLink下载文件? - How do I download a file from LiveLink using c#? 如何在C#中使用Sharpziplib从http下载和提取单个文件? - how can i download and extract single file from http using sharpziplib in c#? 如何从 C# 中的 URL 下载文件? - How to download a file from a URL in C#? 无法从C#下载文件,我可以在浏览器中看到API的响应 - File download from C# not working, I can see in the browser response from the API 在c#中而不是asp中文件下载的情况下,如何使用会话? - How can i use a Session in case of a file download situation in c#, not asp? 如何在C#中以压缩格式下载Google云端硬盘文件 - how can I download Google Drive file in compressed format in c# 如何在 C# 中的按钮的 onClick 事件上下载文件? - How can i download a file on a button's onClick event in C#? 如何在C#中使用WebClient触发事件处理程序并支持timeout属性来下载文件? - How can I download a file using WebClient in C# with firing the eventhandlers and supporting the timeout property? 如何使用 C# HttpClient 下载大文件的一部分 - how can I use C# HttpClient to download a part of large file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM