Server Error in '/' Application.

Could not find a part of the path 'c:\domains\tls\wwwroot\ni\range_log.csv'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\domains\tls\wwwroot\ni\range_log.csv'.

Source Error:


Line 37:         STR_Log = string.Format("{1},{2},{3},{4},{5}{0}", Environment.NewLine, DateTime.Now.ToString(), HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString(), Page.ResolveUrl(Request.RawUrl), HTTP_Referer.ToString(), Request.UserAgent.ToString());
Line 38: 
Line 39:         File.AppendAllText("\\domains\\tls\\wwwroot\\ni\\range_log.csv", STR_Log.ToString());
Line 40: 
Line 41: 

Source File: d:\domains\tls\ni\Pages\Range.aspx.cs    Line: 39

Stack Trace:


[DirectoryNotFoundException: Could not find a part of the path 'c:\domains\tls\wwwroot\ni\range_log.csv'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +271
   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, Boolean useLongPath, Boolean checkHost) +1217
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +144
   System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) +123
   System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) +103
   System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) +30
   System.IO.File.InternalAppendAllText(String path, String contents, Encoding encoding) +63
   ni_Pages_Range.Page_Load(Object sender, EventArgs e) in d:\domains\tls\ni\Pages\Range.aspx.cs:39
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4081.0