Server Error in '/' Application.

Value cannot be null.
Parameter name: virtualPath

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.ArgumentNullException: Value cannot be null.
Parameter name: virtualPath

Source Error:


Line 62:         requestContext.RouteData.Values.Add("PageNumber", PageNumber);
Line 63:         virtualPath = pd.PageName;
Line 64:         return BuildManager.CreateInstanceFromVirtualPath(virtualPath, typeof(Page)) as IHttpHandler;
Line 65:     }
Line 66: }

Source File: d:\spaces\nagariyat-hirsh.co.il\nagariyat-hirsh.co.il\wwwroot\App_Code\CustomRouteHandler.cs    Line: 64

Stack Trace:


[ArgumentNullException: Value cannot be null.
Parameter name: virtualPath]
   System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options) +11964875
   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(String virtualPath, Type requiredBaseType) +19
   CustomRouteHandler.GetHttpHandler(RequestContext requestContext) in d:\spaces\nagariyat-hirsh.co.il\nagariyat-hirsh.co.il\wwwroot\App_Code\CustomRouteHandler.cs:64
   System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +11828922
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +93


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