You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When deploying to our development DNN, PolyDeploy failed to return the expected json results. Instead we got the and error Received error {"Message":"Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property."}
Triaging the DNN Admin Logs discovered the deploy failure was due to sql timeout. When a DNN deploy fails due to sql timeout the entire sql file is added to the log message. It was a very large sql file. Because DNN includes the sql that failed to run in the error message, it exceeded PolyDeploy's ability to generate the results json. This prevented our pipeline from failing gracefully.
We've resolved this issue before by ensuring the serializer supports potentially large objects for serialization, as .net doesn't look at the server web.config for max size for json serialization using Newtonsoft.Json; JavaScriptSerializer serializer = new JavaScriptSerializer { MaxJsonLength = int.MaxValue };
I'm requesting the results handling get the serialization intitalized to support large objects so when DNN fails for sql issues, the proper results can be passed back in the json
The text was updated successfully, but these errors were encountered:
We would certainly accept a pull request that implemented this change. There's also work on a new Deploy Client that uses the new System.Text.Json serializer instead of JavaScriptSerializer, which will also resolve the issue once it's ready.
When deploying to our development DNN, PolyDeploy failed to return the expected json results. Instead we got the and error
Received error {"Message":"Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property."}
Triaging the DNN Admin Logs discovered the deploy failure was due to sql timeout. When a DNN deploy fails due to sql timeout the entire sql file is added to the log message. It was a very large sql file. Because DNN includes the sql that failed to run in the error message, it exceeded PolyDeploy's ability to generate the results json. This prevented our pipeline from failing gracefully.
We've resolved this issue before by ensuring the serializer supports potentially large objects for serialization, as .net doesn't look at the server web.config for max size for json serialization
using Newtonsoft.Json; JavaScriptSerializer serializer = new JavaScriptSerializer { MaxJsonLength = int.MaxValue };
I'm requesting the results handling get the serialization intitalized to support large objects so when DNN fails for sql issues, the proper results can be passed back in the json
The text was updated successfully, but these errors were encountered: