Server Error in '/' Application.

Could not find a part of the path 'C:\inetpub\vhosts\benhviendakhoathachthanh.com.vn\httpdocs\userfiles\doc\6.pdf'.

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:\inetpub\vhosts\benhviendakhoathachthanh.com.vn\httpdocs\userfiles\doc\6.pdf'.

Source Error:


Line 20:         Response.AppendHeader("Content-Disposition", ("attachment; filename=" + tentailieu.Replace("--", "-")))
Line 21: 
Line 22:         Response.WriteFile(filename)
Line 23: 
Line 24:         Response.End()

Source File: C:\Z_Site\thachthanh\download.aspx.vb    Line: 22

Stack Trace:


[DirectoryNotFoundException: Could not find a part of the path 'C:\inetpub\vhosts\benhviendakhoathachthanh.com.vn\httpdocs\userfiles\doc\6.pdf'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +273
   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) +1322
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +127
   System.Web.HttpResponse.WriteFile(String filename, Boolean readIntoMemory) +107
   download.Page_Load(Object o, EventArgs e) in C:\Z_Site\thachthanh\download.aspx.vb:22
   System.Web.UI.Control.OnLoad(EventArgs e) +109
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436


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