Hi all,
I am working on vb.net web application and Often getting the following error. But even with the same inputs it is not reproducable. In most of the cases its executing successfully and in some rare (unknown) cases only its failing. The interesting point is; I just noted one set of the inputs caused the problem and tried to reproduce the same problem but not able to reproduce the error. One time error came at the firstline of the following code.
Dim dsValidTables As WADataset = dsResult.Copy
For Each dt As DataTable In dsValidTables.T ables
If dt.TableName.St artsWith("DimSe l") Then
If Not sValidTables.Co ntains(dt.Table Name) Then 'And Not dt.TableName.Eq uals("DimSelLis t") Then
dsResult.Tables .Remove(dt.Tabl eName)
End If
End If
Next
StackTrace is
[InvalidOperatio nException: Collection was modified; enumeration operation may not execute.]
System.Collecti ons.ArrayListEn umeratorSimple. MoveNext() +2727902
System.Data.Dat aSet.Copy() +328
CB.WADatasource s.GetDatasource s(WAViewMessage aoViewMessage) in C:\Projects\WA\ WebApp\CB\WADat asources.vb:478
CP.ServerContro ls.WAViewManage r.GetDatasource s(WAViewMessage aobjMsg) in C:\Projects\WA\ WebApp\CP.Serve rControls\WAVie wManager.vb:76
DSS.WA.CPO.Serv erControls.WAVi ewManager.Refre sh() in C:\Projects\WA\ WebApp\CP.Serve rControls\WAVie wManager.vb:355
WASoltnSV.Page_ Load(Object sender, EventArgs e) in C:\Solutions\WA 2\WASoltnSV.asp x.vb:19
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +99
System.Web.UI.C ontrol.LoadRecu rsive() +47
System.Web.UI.P age.ProcessRequ estMain(Boolean includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +1061
Any help on reproducing or solving the problem is greatly thankful.
I am working on vb.net web application and Often getting the following error. But even with the same inputs it is not reproducable. In most of the cases its executing successfully and in some rare (unknown) cases only its failing. The interesting point is; I just noted one set of the inputs caused the problem and tried to reproduce the same problem but not able to reproduce the error. One time error came at the firstline of the following code.
Dim dsValidTables As WADataset = dsResult.Copy
For Each dt As DataTable In dsValidTables.T ables
If dt.TableName.St artsWith("DimSe l") Then
If Not sValidTables.Co ntains(dt.Table Name) Then 'And Not dt.TableName.Eq uals("DimSelLis t") Then
dsResult.Tables .Remove(dt.Tabl eName)
End If
End If
Next
StackTrace is
[InvalidOperatio nException: Collection was modified; enumeration operation may not execute.]
System.Collecti ons.ArrayListEn umeratorSimple. MoveNext() +2727902
System.Data.Dat aSet.Copy() +328
CB.WADatasource s.GetDatasource s(WAViewMessage aoViewMessage) in C:\Projects\WA\ WebApp\CB\WADat asources.vb:478
CP.ServerContro ls.WAViewManage r.GetDatasource s(WAViewMessage aobjMsg) in C:\Projects\WA\ WebApp\CP.Serve rControls\WAVie wManager.vb:76
DSS.WA.CPO.Serv erControls.WAVi ewManager.Refre sh() in C:\Projects\WA\ WebApp\CP.Serve rControls\WAVie wManager.vb:355
WASoltnSV.Page_ Load(Object sender, EventArgs e) in C:\Solutions\WA 2\WASoltnSV.asp x.vb:19
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +99
System.Web.UI.C ontrol.LoadRecu rsive() +47
System.Web.UI.P age.ProcessRequ estMain(Boolean includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +1061
Any help on reproducing or solving the problem is greatly thankful.
Comment