Recently, I worked on the issue where user were getting below error message while adding existing task to his Timesheet.

Error: Sorry, something went wrong

 

image

Ran the SQL profiler trace and was unable to find any SQL exception. That means issue is not at database level, but may be at Web Service Level. A quick review of ULS log showed the below exception.

[bucketHash:9283A6E4]  System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.     at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, SerializationFormat serializationFormat)     at

The error indicates that data retrieved is way more than the specified threshold value. After running the SQL query, I found that the user had 560 assignments. We reduced the assignments by “Closing Task to updates” for completed tasks the user and that helped to resolve this issue.