2017-02-02 38 views
0

ASP.NETでAJAXを使用してクライアントからサーバーにパラメータを送信しようとしましたが、このエラーが発生しました。 IISバージョン8.5。エラー(413)リクエストエンティティが大きすぎます

私のWeb設定:ソリューションです

<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> 

友達?

+0

http://stackoverflow.com/questions/10122957/iis7-413-request-entity-too-large-uploadreadheadsize – JKerny

+0

「パラメータ」とは何ですか?それはファイルですか?もしそうなら、どれくらいの大きさ? *エラーは何ですか?もっと情報をお願いします:) – sh1rts

+0

tnx @JeremyKern。私はそれらを追加しました。問題は解決されません。 – Behrad

答えて

0

これは私の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. コメントを保存するために短いボタンを数回クリックすると、コメントが保存されることがあります。しかし、比率は500に1つの

+0

こんにちはBehrad;それでもなお多くの情報が必要です。あなたはサーバー側のコード(AJAXの投稿のターゲット)を投稿できますか? - 最も重要なのは、エラーは何ですか? – sh1rts

0

私の顧客のサーバーマネージャは、あなたが追加する必要があると私に言っている:

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

しかし、私は、構築ファイルにこのコードを追加したときに、パラメータとき6,000に達する...私は会う(414エラー)。

関連する問題