“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------未能找到路径“E:\11111\index.html”的一部分。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.IO.DirectoryNotFoundException: 未能找到路径“E:\11111\index.html”的一部分。源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 堆栈跟踪:
[DirectoryNotFoundException: 未能找到路径“E:\11111\index.html”的一部分。]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +492
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +1038
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +115
System.IO.StreamWriter.CreateFile(String path, Boolean append) +58
System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) +91
System.IO.StreamWriter..ctor(String path, Boolean append) +31
System.IO.File.CreateText(String path) +34
FileRead.fileOper(String& path) +45
ESD_Admin_TemplateManage_Temp_Secont_AddTemp.btnOpenFile_Click(Object sender, EventArgs e) +200
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
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) +1746
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.1433; ASP.NET 版本:2.0.50727.1433 发布到 iis上后 点击 fileupload 浏览到 文件后 点击 打开 读取 文件信息到 textbox 里 找不到 路径 本地 可以 就是发布到 iis 上不行 由于 高版本浏览器 默认 不支持 fileupload 我 用的是js 来 获取 本地 没问题就是 到 个人机器上不行
--------------------------------------------------------------------------------未能找到路径“E:\11111\index.html”的一部分。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.IO.DirectoryNotFoundException: 未能找到路径“E:\11111\index.html”的一部分。源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 堆栈跟踪:
[DirectoryNotFoundException: 未能找到路径“E:\11111\index.html”的一部分。]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +492
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +1038
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +115
System.IO.StreamWriter.CreateFile(String path, Boolean append) +58
System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) +91
System.IO.StreamWriter..ctor(String path, Boolean append) +31
System.IO.File.CreateText(String path) +34
FileRead.fileOper(String& path) +45
ESD_Admin_TemplateManage_Temp_Secont_AddTemp.btnOpenFile_Click(Object sender, EventArgs e) +200
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
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) +1746
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.1433; ASP.NET 版本:2.0.50727.1433 发布到 iis上后 点击 fileupload 浏览到 文件后 点击 打开 读取 文件信息到 textbox 里 找不到 路径 本地 可以 就是发布到 iis 上不行 由于 高版本浏览器 默认 不支持 fileupload 我 用的是js 来 获取 本地 没问题就是 到 个人机器上不行
执行程序的时候判断路径是否存在??
http://www.cnblogs.com/noahsky/archive/2009/09/24/1573442.html