보통 테스트를 통해 보통 개체를 WCF 서비스로 보냅니다. 해당 매개 변수에 null을 전달하면 모든 것이 정상적으로 작동합니다. 채워진 객체를 보낼 때 HTTP 400 응답을받습니다.큰 개체를 WCF로 보내면 400 개의 잘못된 요청이 발생합니다.
<basicHttpBinding>
<binding name="BasicHttpBinding_IMyAppService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="200000000" maxBufferPoolSize="200000000" maxReceivedMessageSize="200000000"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxArrayLength="200000000" maxStringContentLength="200000000"/>
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
을 내가 무엇을 놓치고 다음과 같이 내가 단위 테스트 프로젝트의 app.config의 크기 구성 매개 변수를 크랭크있다, 그러나
The maximum message size quota for incoming messages (65536) has been exceeded.
:
WCF 추적이 오류를 보여줍니다 내 구성에서 허용 된 메시지 크기를 65536 이상으로 올리려면 오류 메시지가 표시됩니까?
업데이트 : 내가 제대로 질문을 이해한다면
<binding name="basicHttpBindingConfig" maxReceivedMessageSize="20000000" maxBufferSize="20000000" maxBufferPoolSize="20000000">
<readerQuotas maxDepth="32" maxArrayLength="200000000" maxStringContentLength="200000000"/>
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm"/>
</security>
</binding>
죄송합니다. 원래 질문에서 해당 부분을 벗어났습니다. . 또한 웹 서비스의 web.config에 maxReceivedMessageSize를 설정합니다. 특정 구성으로 질문이 업데이트됩니다. 거기에 문제가 있습니까? –
웹 서비스를 호스팅 할 위치가 Windows 서비스에서 호스팅되는 경우 appname을 확인하십시오. 구성 설정에 대한 exe.config (여기서 appname은 응용 프로그램 이름 임) – KrishHari
현재 VS 2010의 웹 사이트 프로젝트에서 호스팅되고 있습니다. 해당 프로젝트의 web.config가 있습니다. (관련 부분은 이제 질문에 게시 됨) –