Today morning one of our send the a email that some pages of your application, developed in ASP.Net 2.0 and hosted on client side on windows 2003 serve was caught with below error
Server Error in ‘/’ Application.
Hashtable insert failed. Load factor too high.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Hashtable insert failed. Load factor too high.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: Hashtable insert failed. Load factor too high.] System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +2866582 System.Collections.Hashtable.set_Item(Object key, Object value) +11 System.ComponentModel.ReflectTypeDescriptionProvider.ReflectGetAttributes(Type type) +323
System.ComponentModel.ReflectedTypeData.GetAttributes() +36 System.ComponentModel.DefaultTypeDescriptor.System.ComponentModel.ICustomTypeDescriptor.GetAttributes() +50
System.ComponentModel.TypeDescriptor.GetAttributes(Type componentType) +26
System.Web.UI.ViewStateModeByIdAttribute.IsEnabled(Type type) +46
System.Web.UI.Control.SaveViewStateRecursive() +121
System.Web.UI.Page.SaveAllState() +466
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1676
Version Information: Microsoft .NET Framework Version:2.0.50727.1891; ASP.NET Version:2.0.50727.1887
I was confused to see this error as it is stating that Hashtable insert failed but we don’t used any Hashtable in our programming and also when my first search on internet return that “This error is almost always caused by multiple threads modifying the Hashtable at the same time. The fix is to insert locks before modifying the Hashtable, since Hashtable isn’t multiple writer threadsafe.”
But after googling more I find that it is an Microsoft bug and there is a hot fix that might solve this problems: FIX: A System.InvalidOperationException exception occurs when you run a Web application that is based in the .NET Framework 2.0 SP2 or in the .NET Framework 3.5 SP1 but this also not solved our problem. There is also KB 968432 topic on Microsoft that was saying that you can call Microsoft support and obtain the fix for. Please note that there is no public hot fix for this issue yet.
But I did not called the Microsoft but just reset the IIS and deleted ASP.NET temporary file at %SystemDrive$\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files and
That solved my problem.
Have you got similar problem .Please share your experience, suggestion
Version:2.0.50727.1891; ASP.NET Version:2.0.50727.1887