I do not see any error in my traces but when I see error with procdump.exe, I see the error called
[12:09:52] Exception: E0434F4D.System.ArgumentException ("Error during serializa tion or deserialization using the JSON JavaScriptSerializer. The length of the s tring exceeds the value set on the maxJsonLength property.")
Here is my controller:
public class CommonConverterController : Controller
{
// Post
[System.Web.Http.HttpPost]
public JsonResult CommonToTypeScriptConverter([FromBody]Foo param)
{
string result = string.Empty;
List<string> resultList = new List<string>();
try
{
....
TraceInformation(Common.Enums.TraceEventCategories.None, "CommonToTypeScriptConverter", "fileName: " + fileName);
....
....
....
var jsonResult = Json(resultList, JsonRequestBehavior.AllowGet);
jsonResult.MaxJsonLength = int.MaxValue;
return jsonResult;
}
catch(Exception ex)
{
.....
}
}
I tried solutions in Stackoverflow to fix this error. The solutions were about MaxJsonLength. However, I am using JSON serializer at the end of method. There is no trace line about the enterence of method. I cannot catch the error in catch block as well. I saw the error by using procman.
More than 1.5MB file size does not work. Less than 1.5 MB works with no problem.
To sum up, according to my traces, my http.post call cannot be reached inside the method. Is there any solution to fix this error ?