未能映射路径
行66:if(type=="jpg"||type=="gif"||type=="bmp")行67:{行68:this.FileUpload1.SaveAs(Server....
行 66: if (type == "jpg" || type == "gif" || type == "bmp")
行 67: {
行 68: this.FileUpload1.SaveAs(Server.MapPath("/upload") + "\\" + dataName + fileName);
行 69: picPath = dataName + fileName;
堆栈跟踪
[InvalidOperationException: 未能映射路径“/upload”。]
System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +659
System.Web.VirtualPath.MapPathInternal() +29
System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) +125
System.Web.HttpServerUtility.MapPath(String path) +57
admin_EditProduct.Button1_Click(Object sender, EventArgs e) in f:\czm\admin\EditProduct.aspx.cs:68
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +97
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4866 展开
行 67: {
行 68: this.FileUpload1.SaveAs(Server.MapPath("/upload") + "\\" + dataName + fileName);
行 69: picPath = dataName + fileName;
堆栈跟踪
[InvalidOperationException: 未能映射路径“/upload”。]
System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +659
System.Web.VirtualPath.MapPathInternal() +29
System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) +125
System.Web.HttpServerUtility.MapPath(String path) +57
admin_EditProduct.Button1_Click(Object sender, EventArgs e) in f:\czm\admin\EditProduct.aspx.cs:68
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +97
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4866 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询