Server Error in '/' Application.

String cannot be of zero length.
Parameter name: oldValue

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.ArgumentException: String cannot be of zero length.
Parameter name: oldValue

Source Error:


Line 263:		{
Line 264:			sSitePage = sSitePath.Substring(sSitePath.LastIndexOf("/") + 1);
Line 265:			sSitePath = sSitePath.Replace(sSitePage, "");
Line 266:		}
Line 267:		if (sSitePath.EndsWith("/"))

Source File: d:\HostingData\ha2776\greenrg.org.il\wwwroot\App_Code\Site\ccRouter.cs    Line: 265

Stack Trace:


[ArgumentException: String cannot be of zero length.
Parameter name: oldValue]
   System.String.ReplaceInternal(String oldValue, String newValue) +0
   System.String.Replace(String oldValue, String newValue) +21
   ccRouterModule.AnalyzePath(String sResuestedPath) in d:\HostingData\ha2776\greenrg.org.il\wwwroot\App_Code\Site\ccRouter.cs:265
   ccRouterModule.OnPreRequestHandlerExecute(Object source, EventArgs e) in d:\HostingData\ha2776\greenrg.org.il\wwwroot\App_Code\Site\ccRouter.cs:111
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +144
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73


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