“/”应用程序中的服务器错误。

未能找到路径“E:\web\suifa.com\log\log.txt”的一部分。

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.IO.DirectoryNotFoundException: 未能找到路径“E:\web\suifa.com\log\log.txt”的一部分。

源错误:


行 1247:    Public Shared Sub WriteLogFile(ByVal content As String, ByVal fileName As String)
行 1248:        'Dim fs As New FileStream(System.AppDomain.CurrentDomain.BaseDirectory + "\api\dsf.log", FileMode.Append)
行 1249:        Dim fs As New FileStream(fileName, FileMode.Append)
行 1250:        Dim sw As New StreamWriter(fs)
行 1251:        Try

源文件: E:\web\suifa.com\App_Code\SQLHelper.vb    行: 1249

堆栈跟踪:


[DirectoryNotFoundException: 未能找到路径“E:\web\suifa.com\log\log.txt”的一部分。]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +193
   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) +1162
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +61
   System.IO.FileStream..ctor(String path, FileMode mode) +55
   SQLHelper.WriteLogFile(String content, String fileName) in E:\web\suifa.com\App_Code\SQLHelper.vb:1249
   SQLHelper.GetDataReader(SqlCommand SqlCmd) in E:\web\suifa.com\App_Code\SQLHelper.vb:245
   SQLHelper.GetDataReader(String SQL, SqlConnection SqlCon) in E:\web\suifa.com\App_Code\SQLHelper.vb:263
   SQLHelper.GetDataReader(String SQL) in E:\web\suifa.com\App_Code\SQLHelper.vb:254
   _list.Page_Load(Object sender, EventArgs e) in E:\web\suifa.com\list.aspx.vb:60
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


版本信息: Microsoft .NET Framework 版本:2.0.50727.8964; ASP.NET 版本:2.0.50727.8962