We're using Tridion9.5 & DD4T 2.5

When publishing a page I receive the error "The reader's MaxDepth of 64 has been exceeded." From my understanding this is caused by the latest version of newtonsoft JSONserializer limiting the maxDepth to patch a vulnerability. This fix was implemented in DD4T here: https://github.com/dd4t/DD4T.Model/pull/48

In order to increase the MaxDepth you have to add a an appkey "DD4T.JsonSerializerMaxDepth" with a higher number, which I have done (128).

Next our dll's are combined with ILRepack to create one dll file that can be uploaded with TcmUploadAssembly.exe which is successful. Unfortunately as previously stated we still receive an error that the maxDepth is only set to 64.

In ILRepack's output we receive a combined DD4T.Templates.Merged.dll.config and there is the "DD4T.JsonSerializerMaxDepth" setting with the value 128. So I'm wondering if the config is uploaded or not? In the TcmUploadAssembly config I see an option to enable or disable PDB upload so I wonder if there is a similar option for the .dll.config file

If any DD4T dev's are reading this it would be great if you could approve this PR since it would probably fix our issue too: https://github.com/dd4t/DD4T.Model/pull/53

  • I still don't know if it is possible to pass a configuration when uploading the Dynamic DD4T templating. I think it isn't. I added a custom JSONSerializerService to our DD4T dynamic templates with a maxDepth of 200. Then I replaced all instantiations of JSONSerializerService with our custom implementation. At least this way we can continue working while we wait for a general solution.
    – Rory
    Commented Feb 6, 2023 at 8:46

1 Answer 1


TcmUploadAssembly only uploads .NET assemblies and optionally PDB files. In general, I'm wondering that the purpose of that .dll.config is; .NET doesn't support app config on individual DLLs. Maybe Newtonsoft has a mechanism for this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.