Server Error in '/' Application.

Could not find a part of the path 'C:\www\phongvemaybaylongbinh.vn\ve-may-bay\count_visit.txt'.

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:\www\phongvemaybaylongbinh.vn\ve-may-bay\count_visit.txt'.

Source Error:


Line 88: 
Line 89:         // Lưu dử liệu vào file  count_visit.txt
Line 90:         System.IO.StreamWriter writer = new System.IO.StreamWriter(Server.MapPath("count_visit.txt"));
Line 91:         writer.WriteLine(count_visit);
Line 92:         writer.Close();

Source File: c:\www\phongvemaybaylongbinh.vn\Global.asax    Line: 90

Stack Trace:


[DirectoryNotFoundException: Could not find a part of the path 'C:\www\phongvemaybaylongbinh.vn\ve-may-bay\count_visit.txt'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +281
   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) +1242
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +146
   System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) +126
   System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) +105
   System.IO.StreamWriter..ctor(String path) +52
   ASP.global_asax.Session_Start(Object sender, EventArgs e) in c:\www\phongvemaybaylongbinh.vn\Global.asax:90
   System.Web.SessionState.SessionStateModule.CompleteAcquireState() +375
   System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +1257
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +703
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +158


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