우리는 WCF에서 서비스 방법에 큰 XML 문자열을 보내려고 우리가 오류WCF 구성 maxStringContentLength는
최대 문자열 콘텐츠 길이 할당량 (8192를 받고있어 작동하지 않는 것)가 초과되었습니다. XML 데이터를 읽는 중입니다. 우리는 클라이언트 측 또는 서버 측 또는 두 가지 모두에이 작업을 수행하기로했다 경우에 우리는 확실하지 않았다하더라도
오류는 maxstringcontentlength
을 증가 제안합니다. 우리는 둘 다 시도했지만 오류는 여전히 발생하는 것 같습니다. 아래에 클라이언트와 서비스 설정을 게시하겠습니다. 나는이 중 하나 또는 둘 모두가 작동하지 못하게하는 데 문제가 있다고 가정하고 있습니다.
제안 사항?
클라이언트 :
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ITESTService"
closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8"
transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="4096"
maxNameTableCharCount="2147483647" />
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint name="BasicHttpBinding_ITESTService"
address="http://localhost/TESTService.svc"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_ITESTService"
contract="TESTService.ITESTService" />
</client>
</system.serviceModel>
서버 :
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding
name="BasicHttpBinding_Service1"
maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="32"
maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="4096" maxNameTableCharCount="2147483647" />
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="TESTService">
<endpoint name="BasicHttpBinding_Service1"
address="http://localhost/TESTService.svc"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_Service1"
contract="ITESTService" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
내가없는이 최대 값이 정확하지, 내가 함께 갈 것입니다 : '가 MaxBufferSize = 2147483647, MaxBufferPoolSize = 524,288, MaxReceivedMessageSize = 2147483647, ReaderQuotas이 새로운 XmlDictionaryReaderQuotas = { MAXDEPTH = 32,,MaxStringContentLength = 8192, MaxArrayLength = 16384, MaxBytesPerRead = 4096, MaxNameTableCharCount = 1638 } – DanielV