Server Error in '/' Application.

Could not find a part of the path 'C:\HostingSpaces\kcinstitutes\kcinstitutes.com\wwwroot\Images\newspapers\169%2002-Oct-2018'.

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 'C:\HostingSpaces\kcinstitutes\kcinstitutes.com\wwwroot\Images\newspapers\169%2002-Oct-2018'.

Source Error:


Line 58: 
Line 59:                         var folderName = albumName;
Line 60:                         var fileList = Directory.GetFiles(Server.MapPath("~/Images/newspapers/" + folderName));
Line 61: 
Line 62:                         count = fileList.Count() - 1;

Source File: c:\HostingSpaces\kcinstitutes\kcinstitutes.com\wwwroot\NewspapersFolder.cshtml    Line: 60

Stack Trace:


[DirectoryNotFoundException: Could not find a part of the path 'C:\HostingSpaces\kcinstitutes\kcinstitutes.com\wwwroot\Images\newspapers\169%2002-Oct-2018'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +281
   System.IO.FileSystemEnumerableIterator`1.CommonInit() +421
   System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) +515
   System.IO.Directory.GetFiles(String path) +105
   ASP._Page_NewspapersFolder_cshtml.Execute() in c:\HostingSpaces\kcinstitutes\kcinstitutes.com\wwwroot\NewspapersFolder.cshtml:60
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +99
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +185
   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.4110.0