Server Error in '/' Application.

Index and length must refer to a location within the string.
Parameter name: length

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.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length]
   System.String.Substring(Int32 startIndex, Int32 length) +13148947
   Selectair.Modules.RedirectManagement.Rewriters.HomepageRewriter.RedirectHomepage() in D:\TeamCity\Builds\Grat\Work\4f62da0d86e79345\Selectair.Modules\RedirectManagement\Rewriters\HomepageRewriter.cs:37
   Selectair.Modules.RedirectManagement.Modules.RedirectModule.<OnInit>b__4_2(Object s, EventArgs e) in D:\TeamCity\Builds\Grat\Work\4f62da0d86e79345\Selectair.Modules\RedirectManagement\Modules\RedirectModule.cs:31
   CMS.Base.AbstractHandler.CallEventHandler(EventHandler`1 h, TArgs e) +110
   CMS.Base.AbstractHandler.Raise(String partName, List`1 list, TArgs e, Boolean important) +697
   CMS.Base.SimpleHandler`2.RaiseExecute(TArgs e) +99
   CMS.Base.SimpleHandler`2.RaiseExecute(TArgs e) +130
   CMS.Base.SimpleHandler`2.StartEvent(TArgs e) +203
   CMS.Base.ApplicationModule.BeginRequest(Object sender, EventArgs e) +20
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +201
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +132
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73


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