Server Error in '/' Application.

Could not find file 'D:\Website Files\biosyn35\images\topmenu.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.FileNotFoundException: Could not find file 'D:\Website Files\biosyn35\images\topmenu.txt'.

Source Error:


Line 57:             }
Line 58:             catch (Exception ex) { 
Line 59: 			 var fileStream = new FileStream(Server.MapPath("~\\images\\topmenu.txt"), FileMode.Open, FileAccess.Read);
Line 60:                 using (var streamReader = new StreamReader(fileStream, Encoding.UTF8))
Line 61:                 {

Source File: d:\Website Files\biosyn35\usercontrols\header.ascx.cs    Line: 59

Stack Trace:


[FileNotFoundException: Could not find file 'D:\Website Files\biosyn35\images\topmenu.txt'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +12796926
   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) +738
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access) +69
   BioSyn35.usercontrols_header.Page_Load(Object sender, EventArgs e) in d:\Website Files\biosyn35\usercontrols\header.ascx.cs:59
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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