This is another unique issue that I came across while helping one of my customers, where we were not able to open customized work items from team system web access and were getting the following error message:

 Exception Message: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.


 TFS 2012 Update 3 with Sql 2008 R2


After fiddling around with multiple settings and debugging it for days, eventually we found out that customer had a very complicated work item types and JSON size of work item types exceeded 20MB.


 Hence, we advised them to increase JSON limit to something like 40MB using the following appSettings entry in web.config. 

<add key="maxJsonLength" value="41943040" /> and that resolved the issue.

P.S. JSON(JavaScript Object Notation) is an open standard format that uses human-readable text to transmit data objects consisting of attribute–value pairs. It is used primarily to transmit data between a server and web application, as an alternative to XML.

  Written and reviewed by Nitish Nagpal, Support Escalation Engineer