Server Error in '/' Application.

Could not find a part of the path 'D:\InetPub\vhosts\kulwant1-5687.package\aucklandhouseschoolboys.com\wwwroot\assets\mygallery\Dance'.

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:\InetPub\vhosts\kulwant1-5687.package\aucklandhouseschoolboys.com\wwwroot\assets\mygallery\Dance'.

Source Error:


Line 2:      var folderDir = Request["Id"];
Line 3:      DirectoryInfo fileInfoBody = new DirectoryInfo(Server.MapPath("~/assets/mygallery/" + folderDir));
Line 4:      FileInfo[] fileInfo = fileInfoBody.GetFiles("*.jpg", SearchOption.TopDirectoryOnly);
Line 5:  
Line 6:      var count = 0;

Source File: d:\inetpub\vhosts\kulwant1-5687.package\aucklandhouseschoolboys.com\wwwroot\ImgShow.cshtml    Line: 4

Stack Trace:


[DirectoryNotFoundException: Could not find a part of the path 'D:\InetPub\vhosts\kulwant1-5687.package\aucklandhouseschoolboys.com\wwwroot\assets\mygallery\Dance'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +546
   System.IO.FileSystemEnumerableIterator`1.CommonInit() +201
   System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) +660
   System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption) +96
   ASP._Page_imgshow_cshtml.Execute() in d:\inetpub\vhosts\kulwant1-5687.package\aucklandhouseschoolboys.com\wwwroot\ImgShow.cshtml:4
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +99
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +177
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +86
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +142


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