'/' 應用程式中發生伺服器錯誤。

找不到路徑 'C:\inetpub\wwwroot\LHERBOFLORE-CN\Files\log\Log_20240329.txt' 的一部分。

描述: 在執行目前 Web 要求的過程中發生未處理的例外情形。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。

例外詳細資訊: System.IO.DirectoryNotFoundException: 找不到路徑 'C:\inetpub\wwwroot\LHERBOFLORE-CN\Files\log\Log_20240329.txt' 的一部分。

原始程式錯誤:

只有在偵錯模式編譯時,才可以顯示產生此未處理例外狀況的原始程式碼。若要啟動,請依照下列步驟之一,然後要求 URL:

1. 將 "Debug=true" 指示詞加入產生錯誤的程式碼頂端。例如:

  <%@ Page Language="C#" Debug="true" %>

或:

2. 將下列區段加入您應用程式的組態檔:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

請注意: 第二種技巧會導致在偵錯模式下編譯指定應用程式中的所有檔案。第一種技巧只會造成在偵錯模式下編譯該特定檔案。

重要資訊: 在偵錯模式下執行應用程式會過度耗用記憶體/效能。在實際執行部署之前,應該先確認應用程式已經停止偵錯。

堆疊追蹤:


[DirectoryNotFoundException: 找不到路徑 'C:\inetpub\wwwroot\LHERBOFLORE-CN\Files\log\Log_20240329.txt' 的一部分。]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +239
   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) +2580
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +138
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +98
   System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) +139
   System.IO.StreamWriter..ctor(String path, Boolean append) +48
   System.IO.File.AppendText(String path) +47
   WebLibrary.Log.File.Write(String message, String path, String appName) in C:\Users\marchtu\Desktop\LHERBOFLORE-CN\WebLibrary\Log\File.cs:77
   WebLibrary.Log.File.Publish(Exception exception, String path, String appName) in C:\Users\marchtu\Desktop\LHERBOFLORE-CN\WebLibrary\Log\File.cs:64
   WebLibrary.Log.Publisher.Publish(Exception exception) in C:\Users\marchtu\Desktop\LHERBOFLORE-CN\WebLibrary\Log\Publisher.cs:38
   WebLibrary.Web.UI.Page.OnError(EventArgs e) in C:\Users\marchtu\Desktop\LHERBOFLORE-CN\WebLibrary\Web\UI\Page.cs:27
   System.Web.UI.Page.HandleError(Exception e) +109
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +11166203
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +11165754
   System.Web.UI.Page.ProcessRequest() +91
   System.Web.UI.Page.ProcessRequest(HttpContext context) +240
   ASP.product_detail_aspx.ProcessRequest(HttpContext context) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171


版本資訊: Microsoft .NET Framework 版本:2.0.50727.8806; ASP.NET 版本:2.0.50727.8762