进入梦时才浪漫 2016-09-14 06:41 采纳率: 50%
浏览 991
已结题

spring.net 索引超出了数组界限。

// Spring.Objects.Factory.Support.AbstractObjectFactory
public virtual string[] GetSingletonNames()
{
string[] result;
lock (this.singletonCache)
{
ICollection keys = this.singletonCache.Keys;
result = (string[])new ArrayList(keys).ToArray(typeof(string));
}
return result;
}

IndexOutOfRangeException
索引超出了数组界限。 在 System.Collections.ArrayList.ArrayListEnumeratorSimple.MoveNext()
在 System.Collections.Specialized.OrderedDictionary.OrderedDictionaryKeyValueCollection.System.Collections.ICollection.CopyTo(Array array, Int32 index)
在 System.Collections.ArrayList.InsertRange(Int32 index, ICollection c)
在 Spring.Objects.Factory.Support.AbstractObjectFactory.GetSingletonNames() 在

Spring.Objects.Factory.Support.DefaultListableObjectFactory.DoGetObjectNamesForType(Type type, Boolean includeNonSingletons, Boolean allowEagerInit) 在

Spring.Objects.Factory.Support.DefaultListableObjectFactory.GetObjectsOfType(Type type, Boolean includePrototypes, Boolean includeFactoryObjects) 在 Spring.Context.Support.AbstractApplicationContext.GetObjectsOfType(Type type, Boolean includePrototypes, Boolean includeFactoryObjects) 在 Spring.Context.Support.AbstractApplicationContext.GetObjectsOfType(Type type) 在 Spring.Web.Mvc.SpringControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) 在 System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) 在 Spring.Web.Mvc.SpringControllerFactory.CreateController(RequestContext requestContext, String controllerName) 在 System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) 在 System.Web.Mvc.MvcHandler.<>c__DisplayClass6.b__2() 在 System.Web.Mvc.SecurityUtil.<>c__DisplayClassb1.<ProcessInApplicationTrust>b__a() 在 System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust[TResult](Func1 func) 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

  • 写回答

1条回答

  • it肥马 2016-09-14 07:01
    关注

    尝试下先调用Current(),返回为空,则不要再调用MoveNext(),试试。

    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘