Server Error in '/' Application.

Could not find file 'C:\Hosted\SESWebsprivate\Document\FORS Bronze Certificate expires 19.09.16.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.FileNotFoundException: Could not find file 'C:\Hosted\SESWebsprivate\Document\FORS Bronze Certificate expires 19.09.16.pdf'.

Source Error:


Line 38:             Response.ContentType = "application/pdf"
Line 39:             Response.AppendHeader("Content-Disposition", "attachment; filename=" & filename)
Line 40:             Response.TransmitFile(filePath & filename)
Line 41:             Response.End()
Line 42: 

Source File: C:\Hosted\SESWebsite\ServeDocument.aspx.vb    Line: 40

Stack Trace:


[FileNotFoundException: Could not find file 'C:\Hosted\SESWebsprivate\Document\FORS Bronze Certificate expires 19.09.16.pdf'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +1404
   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) +126
   System.Web.HttpResponse.TransmitFile(String filename, Int64 offset, Int64 length) +139
   ServeDocument.Page_Load(Object sender, EventArgs e) in C:\Hosted\SESWebsite\ServeDocument.aspx.vb:40
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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