My ASP.NET Page Worked And Now When I Postback It Is Blank, No Error Is Shown

Your page has been working just fine and nothing changed in the code, but out of nowhere you are faced with a problem: when you do a postback to the server, all you see is a white blank page. You look at the page source and there is no source.

The cause of this problem is a (fairly) recent Microsoft security update (MS11-100) which limits the number of form keys, files, and JSON members. Microsoft has decided that 1,000 is a good number to go with and therefore, if you have more than that, your GET or POST request is going to fail.

In order to resolve this problem you can increase this number in you Web.Config file by adding an application setting as follows:

<configuration>
  <appSettings>
    <add key="aspnet:MaxJsonDeserializerMembers" value="1000" />
    <add key="aspnet:MaxHttpCollectionKeys" value="1000" />
  </appSettings>
</configuration>

If you do not use JSON, you can take out the MaxJsonDeserializerMembers setting.
Hope this helps someone.

This entry was posted in .NET and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *