WCF 서비스 프로젝트 및 단위 테스트 프로젝트가 포함 된 VS 2010 솔루션이 있습니다. 단위 테스트 프로젝트에는 WCF 서비스에 대한 서비스 참조가 있습니다.WCF 서비스 참조 지원 파일 업데이트되지 않음
WCF 서비스 프로젝트의 Web.config 다른보다 기본 값으로 바인딩 속성의 수를 설정 :
의 Web.config : (특히 해당 MaxBufferSize주의 = "20000000")
을<basicHttpBinding>
<binding name="basicHttpBindingConfig" maxReceivedMessageSize="20000000" maxBufferSize="20000000" maxBufferPoolSize="20000000">
<readerQuotas maxDepth="32" maxArrayLength="200000000" maxStringContentLength="200000000"/>
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm"/>
</security>
</binding>
</basicHttpBinding>
this issue을 조사하는 동안, 나는 단위 테스트 프로젝트의 서비스 참조 지원 파일 내가 기대 값 (WCF 서비스의 web.config에서 구성 즉, 값)을 포함하지 않는 것을 깨닫게되었다 :
configuration.svcinfo : (특히 유의 가 MaxBufferSize = " 65536 ")
<binding hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" messageEncoding="Text" name="BasicHttpBinding_IBishopService" textEncoding="utf-8" transferMode="Buffered">
<readerQuotas maxArrayLength="16384" maxBytesPerRead="4096" maxDepth="32" maxNameTableCharCount="16384" maxStringContentLength="8192" />
<security mode="None">
<message algorithmSuite="Default" clientCredentialType="UserName" />
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
</security>
</binding>
삭제 및 재생성 서비스 참조 또는 파일을 재 - 생성하는 서비스 레퍼런스를 업데이트하지만 나는 여전히 같은 가치관으로 끝난다.
왜?
업데이트
여기에 올바른 동작입니다 클라이언트
<binding name="BasicHttpBinding_IMyService" 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" maxStringContentLength="200000000" maxArrayLength="200000000"
maxBytesPerRead="200000000" maxNameTableCharCount="200000000" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
클라이언트의 app.config에서' 노드에서'bindingConfiguration' 속성을 제거하면 서비스 참조를 업데이트 할 때 일반적인 오류 메시지가 나타납니다. 내가 놓친 게 있니? –
명명 된 바인딩을 찾을 수 없다는 오류가 발생하면 해당 바인딩을 선택하고 효과적으로 해당 구성을 사용하고 있음을 의미합니다. 클라이언트와 서버 바인딩 구성이 동일합니까? 두 가지 모두에 대한 서비스 구성으로 소식을 업데이트 할 수 있습니까? –