A
Alexandre Soares
Hi,
On some pages, I put a collection in the session, which uses the InProc
mode. On pages where the session is extensively used (many collections are
put into it), whenever I try to remove an item from a collection using the
RemoveAt method, I get a "Index was out of range. Must be non-negative and
less than the size of the collection. Parameter name: index" error even
tough I verify in debug that the collection count is equal to 1 and I try to
RemoveAt(collection.count - 1) (so the index is non-negative and is less
than the size of the collection). And that error occurs if I try to remove
any index from the collection. On the other hand, on one specific page where
I put only one collection in the session (but exactly the same logic and
code apply), eveything works fine. Can someone help me out?
Thank you very much!
On some pages, I put a collection in the session, which uses the InProc
mode. On pages where the session is extensively used (many collections are
put into it), whenever I try to remove an item from a collection using the
RemoveAt method, I get a "Index was out of range. Must be non-negative and
less than the size of the collection. Parameter name: index" error even
tough I verify in debug that the collection count is equal to 1 and I try to
RemoveAt(collection.count - 1) (so the index is non-negative and is less
than the size of the collection). And that error occurs if I try to remove
any index from the collection. On the other hand, on one specific page where
I put only one collection in the session (but exactly the same logic and
code apply), eveything works fine. Can someone help me out?
Thank you very much!