So, I keep getting the 500 - Internal server error page on my .net site when I set the maxJsonLength
in my web.config
.
I'm modifying the .config
because even though I use MaxJsonLength = Int32.MaxValue
on my vb.net JavaScriptSerializer
, I'm still getting InvalidOperationException
for a large dictionary I'm trying to transmit even though it's well below the 4GB
the MaxJsonLength @ Int32.MaxValue
allows or even the supposed 4mb
default limit.
I'm using toolkitscriptmanager
if that means anything.
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="2147483647" />
</webServices>
</scripting>
</system.web.extensions>
this didn't help (actually, it also gives 500 error without above code)
<sectionGroup name="system.web.extensions" type="System.Web.Extensions">
<sectionGroup name="scripting" type="System.Web.Extensions">
<sectionGroup name="webServices" type="System.Web.Extensions">
<section name="jsonSerialization" type="System.Web.Extensions" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
heard this should help with InvalidOperationException
, but it didn't. I took it out, and still 500 error.
<add key="aspnet:MaxJsonDeserializerMembers" value="2147483647" />
Many thanks in advance!
Edit
Same problem, but his solution doesn't work for me. The last code he added also gives 500 error. Problem with <system.web.extensions> config group when upgrading to .NET 4.0