1
Error on opening email with error maxJsonLength exceeded
Problem reported by C.L. Lee - 4/17/2018 at 4:03 AM
Submitted
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?

8 Replies

Reply to Thread
0
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.
-John
1
Jack. Replied
You can set the MaxJsonLength property on your web.config:

<configuration>
   <system.web.extensions>
      <scripting>
         <webServices>
            <jsonSerialization maxJsonLength="50000000"/>
         </webServices>
      </scripting>
   </system.web.extensions>
</configuration>

0
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.

0
Employee 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. 
0
CLEBER SAAD Replied
We received on email with 10mb of attachents.
I tried to do this in the web.config, restarted the IIS and MailServer and the problem continues.
Using version 15.7.6726 
Any tips?
0
Kyle Kerst Replied
Employee Post
@Cleber I believe you'll need your own thread on this one, as this post refers to later releases, and your issue looks to be related to maximum message size rather than a JSON problem.
Kyle Kerst IT Coordinator SmarterTools Inc. www.smartertools.com
1
CLEBER SAAD Replied
Hello @Kyle. I will open a support ticket with more information. I assigned with that thread because the message error its the same. Another messages with attachs with same or higer size works fine. It's for a particular message.
0
Kyle Kerst Replied
Employee Post
Thanks Cleber, that sounds like a great plan. We'll get to the bottom of it for you!
Kyle Kerst IT Coordinator SmarterTools Inc. www.smartertools.com

Reply to Thread