Server Error in '/' Application.

Could not find a part of the path 'D:\W2Applications\Web\MyWeather2COMV2MySQL-DEV\images\satpic\NorthAmerica'.

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 'D:\W2Applications\Web\MyWeather2COMV2MySQL-DEV\images\satpic\NorthAmerica'.

Source Error:


Line 26:         List<long> fileTime = new List<long>();
Line 27: 
Line 28:         string[] files = System.IO.Directory.GetFiles(Server.MapPath("~/images/satpic/" + id.Replace("_", "")), "*.jpg");
Line 29:         //foreach (string file in files)
Line 30:         //{

Source File: d:\W2Applications\Web\MyWeather2COMV2MySQL-DEV\satellite\Default.aspx.cs    Line: 28

Stack Trace:


[DirectoryNotFoundException: Could not find a part of the path 'D:\W2Applications\Web\MyWeather2COMV2MySQL-DEV\images\satpic\NorthAmerica'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +193
   System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption) +1923
   System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption) +37
   System.IO.Directory.GetFiles(String path, String searchPattern) +6
   satellite_Default.LatestSatelliteImage(String id) in d:\W2Applications\Web\MyWeather2COMV2MySQL-DEV\satellite\Default.aspx.cs:28
   satellite_Default.Page_Load(Object sender, EventArgs e) in d:\W2Applications\Web\MyWeather2COMV2MySQL-DEV\satellite\Default.aspx.cs:72
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.8762; ASP.NET Version:2.0.50727.8762