【问题标题】:subsonic - Offset and length were out of bounds for the array intermittent error亚音速 - 阵列间歇性错误的偏移量和长度超出范围
【发布时间】:2011-12-20 19:25:52
【问题描述】:

继承了一个使用亚音速 2.0 的网站,并收到“偏移量和长度超出数组范围”的间歇性错误。如果我们要重新启动应用程序或回收应用程序池,问题就会消失。我怀疑这与基于下面的错误日志的亚音速缓存表模式有关。有没有人遇到过这个问题并可以提出解决方案?

System.ArgumentException

数组的偏移量和长度超出范围或计数大于从索引到源集合末尾的元素数。

System.Exception:引发了“System.Web.HttpUnhandledException”类型的异常。 ---> System.ArgumentException:偏移量和长度超出了数组的范围,或者计数大于从索引到源集合末尾的元素数。 在 System.Array.BinarySearch[T](T[] 数组,Int32 索引,Int32 长度,T 值,IComparer1 comparer) at System.Collections.Generic.SortedList2.IndexOfKey(TKey key) 在 System.Collections.Generic.SortedList`2.ContainsKey(TKey 键) 在 SubSonic.DataService.GetSchema(字符串 tableName,字符串 providerName,TableType tableType) 在 SubSonic.DataService.GetTableSchema(字符串表名,字符串 providerName) 在 SubSonic.Query..ctor(字符串表名) 在 C:\Projects\G05\Code\BusinessLogic\ProductController.vb:line 514 中的 G05.ProductController.GetProductByColorName(Int32 productId, String colorName) 处

【问题讨论】:

    标签: subsonic offset indexoutofboundsexception


    【解决方案1】:

    奇怪的是它是断断续续的。对象是如何生成的?是否使用 .abp 文件?如果是这样,我建议通过子命令运行文件以硬生成类。这样,对象的生成就不会在生产环境中执行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-12
      • 2021-08-25
      • 2010-12-31
      • 1970-01-01
      • 2018-04-16
      • 2016-05-26
      相关资源
      最近更新 更多