Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 序列化maxJsonLength web.config错误_Asp.net_Web Services_Json_Web Config - Fatal编程技术网

Asp.net 序列化maxJsonLength 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

我在序列化c#对象列表时遇到问题

当我通过.ajax调用webservice时,会出现一个错误,即长度已超出

为了避免此错误,我在下面的开头添加了以下内容,从而更改了我的web.config:

       <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>