2017-02-02 1 views
0

ASP.NET에서 AJAX를 사용하여 클라이언트에서 서버로 매개 변수를 보내려고했지만이 오류가 발생했습니다. IIS 버전 8.5.오류 (413) 요청 엔터티가 너무 큼

내 웹 설정 : 솔루션의

<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

"매개 변수"는 무엇입니까? 파일 이었습니까? 그렇다면 얼마나 큽니까? * 오류가 무엇입니까? 더 많은 정보 please :) – sh1rts

+0

tnx @JeremyKern. 나는 그들을 추가했다. 그러나 문제는 해결되지 않습니다. – Behrad

답변

0

이 내 아약스 코드 :

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

+0

안녕하세요. 여전히 더 많은 정보가 필요합니다. 서버 측 코드 (AJAX 게시물의 대상)를 게시 할 수 있습니까? 가장 중요한 것은 오류가 무엇입니까? – sh1rts

0

내 고객의 서버 관리자를 추가 할 필요가 있다고 나에게 말했다 :

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

하지만를, 내가 할 때 매개 변수이 파일을 configration하는 코드를 추가 할 때 6000에 도달 ... 나는 (414 오류)를 만난다.

관련 문제