2013-07-08 63 views
0

我正在使用js和jQuery在我的客戶端應用程序中捕獲頁面數據和鼠標移動。我捕獲了所有下面提到的數據沒有任何問題。我需要將我的客戶端應用程序數據發送給WCF服務應用程序進行處理。通常較少的數據意味着4000字節意味着沒有任何問題,數據已發送。但是,如果我發送多,這意味着,其示出了如何從jquery ajax發佈大數據到.NET WCF服務

400壞請求

數據超過4000個字節的頁面的限制的錯誤。 。

即時通訊使用mexhttpbinding端點,因爲我們用來發送數據到跨域。

請提供解決此問題的建議。 [NOTE]我發送json數據

+0

您可以在web.config中設置數據的長度。參閱此[鏈接] [1] [1]:http://stackoverflow.com/questions/1151987/can-i-set-an-unlimited-length-for-maxjsonlength-in-web- config –

回答

0
In Web.config , 
Add : <bindings> 
     <webHttpBinding> 
     <binding name="ApiQuotaBinding" maxReceivedMessageSize="300971520" maxBufferPoolSize="300971520" maxBufferSize="300971520" closeTimeout="00:50:00" openTimeout="00:50:00" receiveTimeout="00:50:00" sendTimeout="00:50:00"> 
      <readerQuotas maxDepth="402" maxStringContentLength="300971520" maxArrayLength="300971520" maxBytesPerRead="300971520"/> 
      <security mode="None"/> 
     </binding> </webHttpBinding> 
    </bindings> 
+0

即時通訊使用mexHttpBinding。它不需要這些配置。我該怎麼辦? >