问题
We've just encountered this error on our web app, and immediately found the article here Hashtable insert failed. Load factor too high. - ASP.NET 2.0.
However, the hotfix that this points to (http://support.microsoft.com/?id=927579) was already included in .NET 2.0 SP1 (http://support.microsoft.com/kb/945757).
A restart of the WWW Publishing Service made it go away. Does anyone know of any other valid conditions where this can occur? And how to make sure they don't happen?
Thanks.
Edit: I believe this could also be linked to another issue we're having with a Dictionary object stored in the Application scope. I've changed the code to use Application.Lock()/Unlock() around writes to the Dictionary, so we'll see if this reoccurs after these changes are released.
Any more pointers anyone could give on possible reasons beyond simply a framework bug would be highly rewarded with praise and adulation!
回答1:
For reference, there's a hotfix for 2.0 SP2 and 3.5 SP1 that may resolve the issue: http://code.msdn.microsoft.com/KB968432
I should add that the first problem appears to have been resolved by the inclusion of Application.Lock()/Unlock() as mentioned in my original post (it's a tough one to test though as it's totally random!). A subsequent "Hashtable insert failed" error occurred on ReflectGetAttributes() as per the article, which is what the hotfix is purported to address.
来源:https://stackoverflow.com/questions/1888072/hashtable-insert-failed-load-factor-too-high-net-2-0-sp2