簡體   English   中英

錯誤(413)請求實體太大

[英]error (413) request entity too larg

我試圖使用ASP.NET中的AJAX從客戶端向服務器發送參數,但遇到此錯誤。 IIS版本8.5。

我的網絡配置:

 <configuration> <system.web> <compilation debug="true" targetFramework="4.5.1"/> <httpRuntime targetFramework="4.5.1" maxRequestLength="10000000" executionTimeout="3600" maxQueryStringLength="1000000" maxUrlLength="1048576" appRequestQueueLimit="50000" enable="true" enableHeaderChecking="true" minFreeThreads="8" minLocalRequestFreeThreads="4" relaxedUrlToFileSystemMapping="false" /> <pages controlRenderingCompatibilityVersion="4.0"/> <globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="en-US" uiCulture="fa-IR" /> </system.web> <system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength="2147483647" maxQueryString="2147483647" maxUrl="2147483647" /> </requestFiltering> </security> </system.webServer> </configuration> 

誰是解決方案的朋友?

這是我的ajax代碼:

 var param_data = "pnumber_post=" + pnumber_post + "" + "&text_box_comment="+ text_box_comment+"" + "&part=" + part + "" + "&page=" + page_english_persian + ""; http_req_post_comment.open("post", "post_comment_all.aspx", true); http_req_post_comment.setRequestHeader("Content-type", "application/x-www-form-urlencoded;charset=UTF-8"); http_req_post_comment.setRequestHeader("Content-Length", param_data.length); http_req_post_comment.send(param_data); 
  • pnumber_post.length = 5。
  • text_box_comment.length = 2000。
  • part.length = 5。
  • page.length = 5。

2015年使用的總字符串。有時當我短時間單擊幾個按鈕來保存評論時,評論將被保存。 但比例是1到500。

我的客戶服務器經理告訴我,您需要添加:

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

但是,當我將此代碼加到配置文件中並且參數達到6,000時...我遇到了(414錯誤)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM