2

管理投稿ページに入ると、次のエラーが表示されます。

"Message":
"Error during serialization or deserialization using the JSON JavaScriptSerializer.
The length of the string exceeds the value set on the maxJsonLength property.",
"StackTrace":"   
at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat)
at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, SerializationFormat serializationFormat)
at System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData, IDictionary`2 rawParams)
at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)", "ExceptionType":"System.InvalidOperationException"

BlogEngine.Net で JSON の長さを増やすにはどうすればよいですか?

4

2 に答える 2

7

次の方法で構成ファイルを変更してみてください

<configuration> 
  <system.web.extensions>
    <scripting>
       <webServices>
           <jsonSerialization maxJsonLength="50000000"/>
       </webServices>
    </scripting>
  </system.web.extensions>
</configuration> 
于 2012-06-07T11:28:28.143 に答える