【发布时间】:2015-04-22 19:16:28
【问题描述】:
我必须从网址文件夹中读取文件...所以使用下面的代码...我没有得到文件列表...
string pathUser = "http:/mentpc.blob.core.windows.net/cents/201503";
string pathDownload = Path.Combine(pathUser, @"20150302110215315197/20150401100536436792");
WebClient client = new WebClient();
Stream stream = client.OpenRead(pathDownload);
StreamReader reader = new StreamReader(stream);
但我收到异常消息 ===>远程服务器返回错误:(404) Not Found。
请帮帮我
【问题讨论】:
-
你需要添加一个结尾向前
/乍一看,http:/应该是http:// -
您尝试在示例代码 20150302110215315197/20150401100536436792 中获取这两个文件还是一个文件?
-
20150302110215315197/20150401100536436792?......这些是子文件夹
标签: c# web webclient directory subdirectory