发送出错
System.InvalidOperationException: 未能映射路径“/file/5.24.rar”。未能映射路径“/file/5.24.rar”。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.InvalidOperationException: 未能映射路径“/file/5.24.rar”。
源错误:
行 52: return;
行 53: }
行 54: this.FileUpload1.PostedFile.SaveAs(Server.MapPath(path));
行 55:
行 56: }
源文件: e:\网站练习\llwg\Default.aspx.cs 行: 54
堆栈跟踪:
[InvalidOperationException: 未能映射路径“/file/5.24.rar”。]
System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +8870298
System.Web.Hosting.HostingEnvironment.MapPathInternal(VirtualPath virtualPath) +42
System.Web.VirtualPath.MapPathInternal() +4
System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) +107
System.Web.HttpRequest.MapPath(VirtualPath virtualPath) +37
System.Web.HttpServerUtility.MapPath(String path) +99
_Default.btnSend_Click(Object sender, EventArgs e) in e:\网站练习\llwg\Default.aspx.cs:54
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint
--------------------编程问答-------------------- 能映射文件吗?
试一试传入 "/file"
补充:.NET技术 , ASP.NET