ASP.NET - System.Web.Util.AppSettings.get_MaxJsonDeserializerMembers() - method not found

If you use ASP.NET and JsonSerializer, you could have the following exception:

"Message":"Method not found:  Int32 System.Web.Util.AppSettings.get_MaxJsonDeserializerMembers()\u0027.","StackTrace":"   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.ThrowIfMaxJsonDeserializerMembersExceeded(Int32 count) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize

This error is due to a new security update for .net 4

To resolve it, you have to install the new patch http://www.microsoft.com/downloads/fr-fr/details.aspx?familyid=37a8fb34-e3ad-4605-980b-28361889ce72

and to add those 2 following keys in your web.config

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



And that's it, it should now work !

Comments are closed

Hi there !

 

Specialized in .net technologies for many years, I am a technology fan in both asp.net and wpf/silverlight, using c# and .net 4.5

Taking advantages of new opportunities offered by the Windows Azure platform and WP/Win 8, I develop applications for Windows Phone, 5 of them are already available on the market place.


 

 

Month List