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

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

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

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

源错误:


行 39:         context.Response.AddHeader("X-RewritePath", path);
行 40: 
行 41:         string file_ext = path.Substring(path.LastIndexOf("."));
行 42:         string content_type = "text/html";
行 43:         RegistryKey file_key = Registry.ClassesRoot.OpenSubKey(file_ext);

源文件: d:\WWW\CMS\mappath.ashx    行: 41

堆栈跟踪:


[ArgumentOutOfRangeException: StartIndex 不能小于 0。
参数名: startIndex]
   System.String.Substring(Int32 startIndex, Int32 length) +14793852
   mappath.ProcessRequest(HttpContext context) in d:\WWW\CMS\mappath.ashx:41
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +790
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +88


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.7.3701.0
XML 地图