views:

1788

answers:

2

I received the following error while trying to login to a secured directory. As far as I know there are no large hashtables in use. The user login information is in the web.config file. Notice this is happening in .NET 2.0. I've searched and found references to this occurring in .net 1.0 or 1.1 environments but I haven't found a solution for it happening in 2.0+.

I need to figure out why this happened so I can avoid it in the future. I could just reset the server and maybe it goes away but I would prefer to understand why it happened.

Here is the entire error page as shown:

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) +2903977 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.ThemeableAttribute.IsTypeThemeable(Type type) +98
System.Web.UI.Control.ApplySkin(Page page) +49
System.Web.UI.Control.InitRecursive(Control namingContainer) +2120286
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +834

Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

+4  A: 

The following hotfix addresses this (and other) issues.

http://support.microsoft.com/?id=927579

(information sourced from here)

Andrew Rollings
i found that one on my search but wasn't sure it was the correct fix. did you encounter this issue and use this hotfix?
Brian Boatright
I have run into this before. I found the same link, and it seemed to resolve it. At least, it never came back... That's not necessarily the same as resolving it :) YMMV
Andrew Rollings
(Of course, it's only been a few days, but touch wood!)
Andrew Rollings
thanks for the update! it seems to only be affecting the admin pages which require a membership provider login. the main public pages are not affected...
Brian Boatright
how do you get the fix? do I have to start a paid support ticket just to get a file?
Brian Boatright
No. You can just request it. As far as I know it should be free for a hotfix. I had to go through 'channels' where I am in order to get it, so I don't know whether our server support team had to raise an incident. I just told 'em how to fix it :)
Andrew Rollings
Thanks for the accept, but did it work for you?
Andrew Rollings
A: 

I've had a similar issue, outlined here: http://stackoverflow.com/questions/1888072/hashtable-insert-failed-load-factor-too-high-net-2-0-sp2

However, the 927579 hotfix was included in .NET 2.0 SP1 ( http://support.microsoft.com/kb/945757 ) and we still got the same issue as listed above. Hopefully the newer hotfix ( http://code.msdn.microsoft.com/KB968432 ) will resolve it once and for all.

I can't vouch for it as I haven't had chance to install it on our server yet, and considering we haven't had a recurrence of the problem after the last time then even if it had been installed I wouldn't be able to say whether it works or not!

Town
968432 killed our .net installation and we ended up having to completely reinstall .net. That's not to say that it won't work for someone else, but be aware that it may require more than 5 minutes of support!
Town