Asp.net 序列化maxJsonLength web.config错误
我在序列化c#对象列表时遇到问题 当我通过.ajax调用webservice时,会出现一个错误,即长度已超出 为了避免此错误,我在下面的开头添加了以下内容,从而更改了我的web.config:Asp.net 序列化maxJsonLength web.config错误,asp.net,web-services,json,web-config,Asp.net,Web Services,Json,Web Config,我在序列化c#对象列表时遇到问题 当我通过.ajax调用webservice时,会出现一个错误,即长度已超出 为了避免此错误,我在下面的开头添加了以下内容,从而更改了我的web.config: <configuration> <system.web.extensions> <scripting> <webServices> <js
<configuration>
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="500000"></jsonSerialization>
</webServices>
</scripting>
</system.web.extensions>
...
</configuration>
...
现在,我在启动asp.net应用程序时遇到一个错误
“system.web.extensions未知”?
这对我有用。标记顺序错误。我已经更改了webconfig中的位置。我将其放在后面。工作正常。没有json错误
<system.web.extensions>
<scripting>
<scriptResourceHandler enableCompression="true" enableCaching="true"/>
<webServices>
<jsonSerialization maxJsonLength="50000000"/>
</webServices>
</scripting>
</system.web.extensions>