日期:2014-05-17  浏览次数:20943 次

Server.MapPath路径问题
string _filedir = Server.MapPath("192.168.0.222/E:/upload");
报错
不支持给定路径的格式。
E:\upload  在192.168.0.222是存在的
路径问题

------解决方案--------------------
MapPath:

eturns the physical file path that corresponds to the specified virtual path on the Web server.

你的路径是virtual path on the Web server.吗?
------解决方案--------------------
共享 192.168.0.222 下 E:/upload --> Upload,当然设置好授权

然后程式直接访问 string _filedir = "\\192.168.0.222\Upload"

不需要使用Server.MapPath