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

StartIndex 不能小于 0。
参数名: startIndex

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

异常详细信息: System.ArgumentOutOfRangeException: StartIndex 不能小于 0。
参数名: startIndex

源错误:


行 142:    protected string getCid(string path, string replace_str)
行 143:    {
行 144:        string cclass = path.Substring(path.IndexOf(replace_str));
行 145:        cclass = cclass.Replace(replace_str, "");
行 146:        cclass = cclass.Split('-')[0];

源文件: d:\web\phoenixsoft.cn2023\Global.asax    行: 144

堆栈跟踪:


[ArgumentOutOfRangeException: StartIndex 不能小于 0。
参数名: startIndex]
   System.String.Substring(Int32 startIndex, Int32 length) +13148758
   System.String.Substring(Int32 startIndex) +16
   ASP.global_asax.getCid(String path, String replace_str) in d:\web\phoenixsoft.cn2023\Global.asax:144
   ASP.global_asax.getPath(String path) in d:\web\phoenixsoft.cn2023\Global.asax:186
   ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in d:\web\phoenixsoft.cn2023\Global.asax:105
   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


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