Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7000561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:41:17+00:00 2026-05-27T20:41:17+00:00

Microsoft recently (12-29-2011) released an update to address several serious security vulnerabilities in the

  • 0

Microsoft recently (12-29-2011) released an update to address several serious security vulnerabilities in the .NET Framework. One of the fixes introduced by MS11-100 temporarily mitigates a potential DoS attack involving hash table collisions. It appears this fix breaks pages that contain a lot of POST data. In our case, on pages that have very large checkbox lists. Why would this be the case?

Some non-official sources seem to indicate that MS11-100 places a limit of 500 on postback items. I can’t find a Microsoft source that confirms this. I know that View State and other framework features eat up some of this limit. Is there any configuration setting that controls this new limit? We could switch away from using checkboxes but it works rather well for our particular situation. We’d also like to apply the patch because it protects against some other nasty things.

Unofficial source discussing the 500 limit:

The bulletin fixes the DOS attack vector by providing a limit to the
number of variables that can be submitted for a single HTTP POST
request. The default limit is 500 which should be enough for normal
web applications, but still low enough to neutralize the attack as
described by the security researchers in Germany.

EDIT: Source code with example of limit (which appears to be 1,000, not 500)
Create a standard MVC app and add the following code to the main index view:

@using (Html.BeginForm()) 
{
    <fieldset class="fields">
        <p class="submit">
            <input type="submit" value="Submit" />
        </p>

        @for (var i = 0; i < 1000; i++)
        {
            <div> @Html.CheckBox("cb" + i.ToString(), true) </div>
        } 
    </fieldset>
}

This code worked before the patch. It doesn’t work after. The error is:

[InvalidOperationException: Operation is not valid due to the current
state of the object.]
System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded()
+82 System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding) +111
System.Web.HttpRequest.FillInFormCollection() +307

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:41:17+00:00Added an answer on May 27, 2026 at 8:41 pm

    Try adding this setting in web.config. I just tested this on .NET 4.0 with an ASP.NET MVC 2 project and with this setting your code doesn’t throw:

    <appSettings>
      <add key="aspnet:MaxHttpCollectionKeys" value="1001" />
    </appSettings>
    

    That should work now (after you have applied the security update) to change the limit.


    I hadn’t updated my machine yet, so using Reflector I checked the HttpValueCollection class, and it didn’t have the ThrowIfMaxHttpCollectionKeysExceeded method:

    enter image description here

    I installed KB2656351 (update for .NET 4.0), reloaded the assemblies in Reflector and the method appeared:

    enter image description here

    So that method is definitely new. I used the Disassemble option in Reflector, and from what I can tell from the code it checks an AppSetting:

    if (this.Count >= AppSettings.MaxHttpCollectionKeys)
    {
      throw new InvalidOperationException();
    }
    

    If it doesn’t find the value in the web.config file, it will set it to 1000 in System.Web.Util.AppSettings.EnsureSettingsLoaded (an internal static class):

     _maxHttpCollectionKeys = 0x3e8;
    

    Also, Alexey Gusarov tweeted about this setting two days ago:

    • http://twitter.com/#!/tr_tr_mitya/status/152473667102715904
    • http://twitter.com/#!/tr_tr_mitya/status/152475158941138944

    And here is an official answer from a Q&A with Jonathan Ness (Security Development Manager, MSRC) and Pete Voss (Sr. Response Communications Manager, Trustworthy Computing):

    Q: Is AppSettings.MaxHttpCollectionKeys the new parameter that
    contains the maximum number of form entries?

    A: Yes it is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As you might know, Microsoft recently deployed a security update for Visual Studio: KB971090
Microsoft recently released tools and documentation for its new Phone 7 platform, which to
I recently discovered a .NET XmlDiffPatch library written by Microsoft. It allows calculate differences
I recently installed the ASP.NET MVC 4 Developer Preview (which Microsoft says can be
The recently announced managed extensibility framework (MEF) of .NET 4.0 - is it a
Microsoft have recently released a Bing maps objective c component. See here and here
Microsoft recently announced that the Javascript/HTML DOM library jQuery will be integrated into the
Microsoft recently announced that they were endorsing jQuery as an officially supported JavaScript library.
I recently came upon a Microsoft article that touted new defensive enhancements of Windows
Recently I installed Oracle and the required Microsoft Loopback Adaptor, which worked fine. However,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.