2012-06-07 26 views
2

輸入管理員的職位頁面時我收到以下錯誤:BlogEngine.Net Json序列化長度錯誤?

"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的長度?

回答

7

嘗試通過

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

的最佳方式更改配置文件分配int32.maxvalue到maxJSonLength爲2147483647