“/”应用程序中的服务器错误。

长度不能小于 0。
参数名: length

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.ArgumentOutOfRangeException: 长度不能小于 0。
参数名: length

源错误:


行 65:                   int startIndex = url.LastIndexOf('/') + 1;
行 66:                   int endIndex = url.LastIndexOf('.');
行 67:                   url = url.Substring(startIndex, (endIndex - startIndex));                         
行 68:                 %>
行 69:                 <li class="<%=url.ToLower().Contains("default") ? "on" : ""%>"><a href="default.aspx">网站首页</a></li>

源文件: f:\dongtai\bjrdzk.com\master\main.Master    行: 67

堆栈跟踪:


[ArgumentOutOfRangeException: 长度不能小于 0。
参数名: length]
   System.String.Substring(Int32 startIndex, Int32 length) +13025523
   ASP.master_main_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in f:\dongtai\bjrdzk.com\master\main.Master:67
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +268
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.Control.Render(HtmlTextWriter writer) +12
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1303


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.7.3650.0