1

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

System.ArgumentException

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

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

4

1 回答 1

0

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

于 2012-01-14T19:55:51.890 回答