Server Error in '/' Application.

Could not find a part of the path 'E:\HostingSpaces\jnpgorgi\jnpg.org.in\wwwroot\Gallery\Research%20Cell%20Work%20shop%20on%20RM%2015%20Jan%202019'.

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\jnpgorgi\jnpg.org.in\wwwroot\Gallery\Research%20Cell%20Work%20shop%20on%20RM%2015%20Jan%202019'.

Source Error:


Line 14:         Label2.Text = foldername;
Line 15: 
Line 16:         string[] filenames = Directory.GetFiles(@"E:\HostingSpaces\jnpgorgi\jnpg.org.in\wwwroot\Gallery\" + foldername + "", "*", SearchOption.AllDirectories); //server
Line 17:         //string[] filenames = Directory.GetFiles(@"E:\SUDHIR LETEST BKP\JNPG Website Server\Gallery\" + foldername + "", "*", SearchOption.AllDirectories); //local  
Line 18:         int i = 0;

Source File: e:\hostingspaces\jnpgorgi\jnpg.org.in\wwwroot\redgal.aspx.cs    Line: 16

Stack Trace:


[DirectoryNotFoundException: Could not find a part of the path 'E:\HostingSpaces\jnpgorgi\jnpg.org.in\wwwroot\Gallery\Research%20Cell%20Work%20shop%20on%20RM%2015%20Jan%202019'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +239
   System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption) +1479
   System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption) +52
   redgal.Page_Load(Object sender, EventArgs e) in e:\hostingspaces\jnpgorgi\jnpg.org.in\wwwroot\redgal.aspx.cs:16
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.9061; ASP.NET Version:2.0.50727.9062