serialization-maxJsonLength web.config error
I have a problem when serializing a list<> of c# objects.
when i call a webservice via .ajax there is an error saying that that the length has excedeed..
to avoid this error ,i changed my web.config by adding in the begining of as bellow:
<configuration>
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="开发者_运维百科500000"></jsonSerialization>
</webServices>
</scripting>
</system.web.extensions>
...
</configuration>
now i'm getting an error when i launch my asp.net application "system.web.extensions unknown"?
<system.web.extensions>
<scripting>
<scriptResourceHandler enableCompression="true" enableCaching="true"/>
<webServices>
<jsonSerialization maxJsonLength="50000000"/>
</webServices>
</scripting>
</system.web.extensions>
This works for me. The tag orders are wrong.
精彩评论