怎么“检查堆栈跟踪信息”

例如:

[ArgumentOutOfRangeException: startIndex 不能大于字符串长度。
参数名: startIndex]
   System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +7490931
   System.String.Substring(Int32 startIndex) +17
   WebApplication1._Default.Page_Load(Object sender, EventArgs e) in F:\test\WebApplication1\Default.aspx.cs:19
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

 

希望哪位大哥给个详细的解释,或者给个链接,我没找着相关资料。


喵喔喔
浏览 667回答 1
1回答

墨色风雨

问题应该是出在 Page_Load 函数中。我判断你在这个函数中使用了 str.Substring(xxx) ,而这个 xxx 大于了 str.Length-1
打开App,查看更多内容
随时随地看视频慕课网APP