Server Error in '/' Application.

Could not find a part of the path 'e:\hostingspaces\soft310\heritagedanceacademy.com\wwwroot\img\sections\gallery\5National'.

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 'e:\hostingspaces\soft310\heritagedanceacademy.com\wwwroot\img\sections\gallery\5National'.

Source Error:


Line 32: 
Line 33:                 DirectoryInfo dir = new DirectoryInfo(path);
Line 34:                 var files = dir.GetFiles("*.txt");
Line 35:                 foreach (var file in files)
Line 36:                 {

Source File: e:\hostingspaces\soft310\heritagedanceacademy.com\wwwroot\VisitGallery.aspx.cs    Line: 34

Stack Trace:


[DirectoryNotFoundException: Could not find a part of the path 'e:\hostingspaces\soft310\heritagedanceacademy.com\wwwroot\img\sections\gallery\5National'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +447
   System.IO.FileSystemEnumerableIterator`1.CommonInit() +161
   System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) +500
   System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption) +65
   System.IO.DirectoryInfo.GetFiles(String searchPattern) +14
   VisitGallery.Page_Load(Object sender, EventArgs e) in e:\hostingspaces\soft310\heritagedanceacademy.com\wwwroot\VisitGallery.aspx.cs:34
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +85
   System.Web.UI.Control.OnLoad(EventArgs e) +79
   System.Web.UI.Control.LoadRecursive() +130
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2853


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