路径中的非法字符 [英] Illegal characters in path

查看:159
本文介绍了路径中的非法字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



我写了这段代码它给出了错误路径中的非法字符。



Hello,

I have written this code it is giving error "Illegal characters in path."

WebClient client = new WebClient();
            string Path = @"111.11.111.111:111\abc\abc\abc\";            
            Byte[] buffer = client.DownloadData(Path + lblresult.Text);
            Response.ContentType = "application/pdf";
            Response.AddHeader("content-length", buffer.Length.ToString());
            Response.BinaryWrite(buffer);





请帮助..............



please Help..............

推荐答案

会员11014751写道:
Member 11014751 wrote:



文件夹是在服务器上,我想访问...那是一个IP地址...


Folder is on server and i want to access that... and that is a IP address...

我再次重复:':'是路径的无效字符。



这是你的问题:不要将 URI scheme 与URI的其他元素混淆,了解哪个部分是什么:

http://en.wikipedia.org/wiki/URI_scheme [ ^ ],

http ://en.wikipedia.org/wiki/Uniform_resource_identifier [ ^ ],

http://en.wikipedia.org/wiki/Uniform_resource_locator [ ^ ]。



最后引用的文章包含允许的字符。



-SA

I repeat once again: ':' is and invalid character for path.

Here is your problem: don't mix up URI scheme with other elements of URI, learn what part is what:
http://en.wikipedia.org/wiki/URI_scheme[^],
http://en.wikipedia.org/wiki/Uniform_resource_identifier[^],
http://en.wikipedia.org/wiki/Uniform_resource_locator[^].

Last referenced article contains allowed characters.

—SA


非法字符是':'。毕竟,了解哪些字符有效且什么不是!



-SA
Illegal character is ':'. After all, learn what characters are valid and what not!

—SA


这篇关于路径中的非法字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆