2011-03-14 17 views
1

C#オブジェクトのリスト<>をシリアル化する際に問題があります。serialization-maxJsonLength web.configエラー

私は長さがこのエラーを回避するために...

をexcedeedたことというエラーがあるアヤックスを経由してWebサービスを呼び出すときに、私はのように怒鳴るの初めに追加することによって、私のweb.configファイルを変更:

 <configuration> 

     <system.web.extensions> 
      <scripting> 
      <webServices> 
       <jsonSerialization maxJsonLength="500000"></jsonSerialization> 
      </webServices> 
     </scripting> 
     </system.web.extensions> 
     ... 
     </configuration> 

私はasp.netアプリケーションを起動するとエラーが発生します "system.web.extensions unknown"?

+1

webconfigのの位置が変更されました。 .Works fine.No json errorの後に置きます。 –

答えて

0
<system.web.extensions> 
    <scripting> 
     <scriptResourceHandler enableCompression="true" enableCaching="true"/> 
     <webServices> 
     <jsonSerialization maxJsonLength="50000000"/> 
     </webServices> 
    </scripting> 
    </system.web.extensions> 

これは私に役立ちます。タグの注文が間違っています。

関連する問題