I'm hoping someone will be able to point me in the right direction with this. Although I've found similar questions here, most of the answers relate to threading, and my app is synchronous. This is my first question and i'm a grad so apologies if the formatting / clarity of the question etc is off.
Some background: I've recently deployed a change to a customer's application. (C# .net web forms using a custom framework for creation and management of controls) The customer has two PROD environments; one internal to which we have access and release to; and one that's external that we don't have access to. The change works on my system, UAT and internal PROD. However, when we try to run the code in the external PROD we get this stack trace:
System.ArgumentException: Source array was not long enough. Check srcIndex and length, and the array's lower bounds. at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length) at System.Collections.Generic.List
1.set_Capacity(Int32 value) at System.Collections.Generic.List
1.EnsureCapacity(Int32 min) at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable
1 collection) at System.Collections.Generic.List1.AddRange(IEnumerable
1 collection)
Here is the code that's kicking off (its part of the custom framework):
List<BusinessObjectProperty> fields
= ReflectionHelper.GetPrimaryKeyProperties(businessObject.GetType(), false);
fields.AddRange(ReflectionHelper.GetConcurrencyVersionProperties(businessObject.GetType()));
The ReflectionHelper pretty much sits on the ObjectCache. It checks to see if the object type is in the ObjectCache and returns all the properties of the passed object if it is. If it's not in the cache it uses reflection to get the properties and then adds it to the cache and then returns all the properties.
I'd point out that none of this code has been changed as part of the recent release, but rolling it back resolves the problem. I've been unable to replicate the issue and the customer has assured us that the application pool in the problem environment is set to use a maximum of one worker process.
Any advice will be much appreciated as we have been banging our heads against this for a few days now.
Thanks
Aucun commentaire:
Enregistrer un commentaire