System.IndexOutOfRangeException bug in Enterprise Library 3.1

Topics: Data Access Application Block
Jun 11, 2009 at 10:48 AM

I am using Enterprise Library 3.1.   Always get below error in application log.  I have checked the code, no static Connection/Command/Reader.

just like    http://entlib.codeplex.com/WorkItem/View.aspx?WorkItemId=11905

 

 ASP.NET 2.0.50727.0

Application ID: /LM/W3SVC/1/ROOT

 

Process ID: 6572

 

Exception: System.IndexOutOfRangeException

 

Message: sHotelID

 

StackTrace:     System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)

    System.Data.SqlClient.SqlDataReader.GetOrdinal(String name)

    System.Data.SqlClient.SqlDataReader.get_Item(String name)

    Htinns.Common.RoomStatusCache.RoomStatusCache.MonitorState()

    Htinns.Common.RoomStatusCache.RoomStatusCache.Monitor()

    System.Threading.ThreadHelper.ThreadStart_Context(Object state)

    System.Threading.ExecutionContext.runTryCode(Object userData)

    System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)

    System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

    System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

    System.Threading.ThreadHelper.ThreadStart()

 

  .NET Runtime 2.0 Error Reporting

EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.3959, P3 45d6968e, P4 system.data, P5 2.0.0.0, P6 471ebf27, P7 151b, P8 1a, P9 system.indexoutofrangeexception, P10 NIL.

Could any confirm this?

Thanks,

-Billy

Jun 11, 2009 at 11:33 AM

HI ,

I just found a article which was the silimar error mentioned.

http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/74a5db87-c63f-4386-b317-e848dedb2cd9

 

-Billy

 

Jun 15, 2009 at 3:23 AM

Is it also intermittent or you could repro it?  I'll try to use the regular ADO.NET to verify if this is its bug or EntLib's.  If you could also try doing this without requiring a lot of effort from you, that would be great.

 

Sarah Urmeneta
Global Technology & Solutions
Avande, Inc.
entlib.support@avanade.com

Jun 17, 2009 at 2:15 AM

it is intermittent . And it seems a ado.net bug.

Jun 17, 2009 at 7:14 AM

Yes it does seem like it.  Did you try the suggestion mentioned in the other links? To modify the stored procedures to specify the names of the columns to select rather than using *? It's quite hard to repro, I must admit I haven't repro it using both plain ado.net and entlib.   Anyway, if I finally got to encounter it, i'll let you know.  That's all I can do for now, if it's an ado.net bug, that's something out of entlib's control. 

 

Sarah Urmeneta
Global Technology & Solutions
Avande, Inc.
entlib.support@avanade.com