PollingDuplexHttpBinding과 함께 SL 4 및 .net-4 WCF 서비스를 사용하고 있습니다. 서비스를 호출하고 서비스에서 클라이언트를 다시 호출하면 정상적으로 작동합니다. 그러나 서비스를 호출하자마자 비동기 응답을 기다리지 않고 15 번 말하면 0, 1 또는 2 개의 성공적인 응답을 얻은 후 TargetInvocationException을 수신합니다. 서비스에 대한여러 WCF 서비스 호출에서 TargetInvocationException이 발생했습니다.
내 속성은 다음과 같습니다
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single,
ConcurrencyMode = ConcurrencyMode.Multiple)]
이 내 Web.config의에 있습니다
<behaviors>
<serviceBehaviors>
<behavior name="RecordProviderServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
<serviceTimeouts transactionTimeout="05:05:00" />
<serviceThrottling maxConcurrentCalls="500" maxConcurrentSessions="500"
maxConcurrentInstances="2147483647" />
</behavior>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
<bindings>
<pollingDuplexHttpBinding>
<binding name="multipleMessagesPerPollPollingDuplexHttpBinding"
maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
maxOutputDelay="00:00:00.200" duplexMode="MultipleMessagesPerPoll" />
</pollingDuplexHttpBinding>
</bindings>
과 같이, 내가 클라이언트 측에서 서비스의 인스턴스 :
var binding = new PollingDuplexHttpBinding(PollingDuplexMode.MultipleMessagesPerPoll)
{
MaxBufferSize = 2147483647,
MaxReceivedMessageSize = 2147483647
};
_service = new ServiceClient(new InstanceContext(this),
binding,
new EndpointAddress("path to .svc"));
을
WCF를 처음 접했을 때 뭔가 놓쳤습니까?
즉시 예외 오류를 가져옵니다 –