Server Error in '/' Application.

Could not find a part of the path 'D:\v016222\chscrazyforever.cz\Upload\Beeba_Tests'.

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:\v016222\chscrazyforever.cz\Upload\Beeba_Tests'.

Source Error:


Line 24:         String RealPath = HttpContext.Current.Server.MapPath(virtualPath); //it must be done at web application
Line 25:         System.IO.DirectoryInfo directory = new System.IO.DirectoryInfo(RealPath);
Line 26:         FileInfo[] files = directory.GetFiles("*.jpg"); //Getting Text files
Line 27:         foreach(FileInfo file in files )
Line 28:         {

Source File: d:\v016222\chscrazyforever.cz\WWWRoot\App_Code\ImageHelper.cs    Line: 26

Stack Trace:


[DirectoryNotFoundException: Could not find a part of the path 'D:\v016222\chscrazyforever.cz\Upload\Beeba_Tests'.]
   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.DirectoryInfo.GetFiles(String searchPattern, SearchOption searchOption) +58
   System.IO.DirectoryInfo.GetFiles(String searchPattern) +6
   ImageHelper.GetImageList(String virtualPath) in d:\v016222\chscrazyforever.cz\WWWRoot\App_Code\ImageHelper.cs:26

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
   System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +71
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +261
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
   System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +488
   System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1247
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +19
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
   System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender(EventArgs e) +22
   OboutInc.ImageZoom.ImageZoom.OnPreRender(EventArgs e) +301
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842


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