Error on opening email with error maxJsonLength exceeded
Problem reported by C.L. Lee - 4/17/2018 at 4:03 AM
Our client getting the error on webmail when trying to check out an email.
From the error log it's stated below:
System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property
Have tried to increase the maxJsonLength value in web.config but can't seems to work,
any recommend resolution?

4 Replies

Reply to Thread
secretwep Replied
I came across this same issue today.  I also increased maxJsonLength in web.config to no avail.  It's only on one email and I've never encountered it before on any SM version over the past 7-8 years.
Jack. Replied
You can set the MaxJsonLength property on your web.config:

            <jsonSerialization maxJsonLength="50000000"/>

secretwep Replied
That is indeed how it is set.  Both CL Lee and I did this, as alluded to in the posts.

My solution: I had the client have his client re-send the email.  It had an attachment, so I told him to have it resent zipped up.  Since this has only happened once in nearly a decade, I'm not too concerned anymore.

Andrea Rogers Replied
Employee Post
Thanks for your update, secretwep. 
C.L Lee, please also note that you'll need to stop the SmarterMail Service before modifying system files. 

Andrea Rogers
SmarterTools Inc.


Reply to Thread