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

System.Web.Services.Protocols.SoapException: 服务器无法处理请求。 ---> System.InvalidOperationException: 集合已修改;可能无法执行枚举操作。
  在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
  在 System.Collections.Generic.List`1.Enumerator.MoveNextRare()
  在 System.Collections.Generic.List`1.Enumerator.MoveNext()
  在 XuexiCollection.XXService.getAllChildren(String parentId)
  --- 内部异常堆栈跟踪的结尾 ---

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

异常详细信息: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: 服务器无法处理请求。 ---> System.InvalidOperationException: 集合已修改;可能无法执行枚举操作。
  在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
  在 System.Collections.Generic.List`1.Enumerator.MoveNextRare()
  在 System.Collections.Generic.List`1.Enumerator.MoveNext()
  在 XuexiCollection.XXService.getAllChildren(String parentId)
  --- 内部异常堆栈跟踪的结尾 ---

源错误:

行 25: 
行 26:         string kaoshiFolderId = "99a5bfaf-aad0-4b4d-b7b4-72ca421ef1a9";
行 27:         AllComFolder[] kaoshiFolders = service.getAllChildren(kaoshiFolderId);
行 28: 
行 29:         List<AllComFolder> list = new List<AllComFolder>();

源文件: g:\book 20150409\book\AllClassList.aspx.cs    行: 27

堆栈跟踪:

[SoapException: System.Web.Services.Protocols.SoapException: 服务器无法处理请求。 ---> System.InvalidOperationException: 集合已修改;可能无法执行枚举操作。
   在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   在 System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   在 System.Collections.Generic.List`1.Enumerator.MoveNext()
   在 XuexiCollection.XXService.getAllChildren(String parentId)
   --- 内部异常堆栈跟踪的结尾 ---]
   System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +183743
   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +221
   SC1000Book.DDL.XXService.XXService.getAllChildren(String parentId) +121
   book_AllClassList.Page_Load(Object sender, EventArgs e) in g:\book 20150409\book\AllClassList.aspx.cs:27
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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