不支持uri格式

string saveFilePath=server.mapPath("http://www.aa.com/imgages/aa/bb/1.jpg");

  if (!System.IO.Directory.Exists(saveFilePath))
                {
                    System.IO.Directory.CreateDirectory(saveFilePath); 
                }

在System.IO.Directory.CreateDirectory(saveFilePath); 就报错,不支持uri格式

解决办法:

如果用到了Server.MapPath(string filepath),filepath须为相对路径,不能带有像 http://192.168.1.1:80的地址,问题解决。

posted @ 2013-05-28 21:37  郭二的  阅读(2857)  评论(0编辑  收藏  举报