string new_path = Server.MapPath("~/personal") + direcotryname;
Directory.CreateDirectory(new_path); this.File1.PostedFile.SaveAs("personal/"+direcotryname + "\\" + fileName);异常详细信息: System.Web.HttpException: SaveAs 方法被配置为需要根路径,但是路径“personal/201101-14\”不是根路径。源错误:
行 31: Directory.CreateDirectory(new_path);
行 32:
行 33: this.File1.PostedFile.SaveAs("personal/"+direcotryname + "\\" + fileName);
行 34:
行 35: }
Directory.CreateDirectory(new_path); this.File1.PostedFile.SaveAs("personal/"+direcotryname + "\\" + fileName);异常详细信息: System.Web.HttpException: SaveAs 方法被配置为需要根路径,但是路径“personal/201101-14\”不是根路径。源错误:
行 31: Directory.CreateDirectory(new_path);
行 32:
行 33: this.File1.PostedFile.SaveAs("personal/"+direcotryname + "\\" + fileName);
行 34:
行 35: }
Directory.CreateDirectory(new_path);
this.File1.PostedFile.SaveAs(new_path+"\\" + fileName);
行 27: //this.File1.PostedFile.SaveAs(Server.MapPath("~/personal") + "\\" + fileName);
行 28: string direcotryname = DateTime.Now.ToString("yyyyMM\dd");
行 29: string new_path = Server.MapPath("~/personal/") + direcotryname;
行 30:
本内容使用CSDN 小秘书回复
看帖回帖,发帖也要结贴哦!
*************************************************[/align]