2010-05-26 3 views
0

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를 처음 접했을 때 뭔가 놓쳤습니까?

답변

2

TargetInvocationException에는 실제 예외가 포함 된 InnerException 속성이 있어야하며, 몇 가지 실마리를 제공 할 수 있습니다.

+0

즉시 예외 오류를 가져옵니다 –

0

아니요. 단서가 없습니다. 원격 서버에서 오류를 찾을 수 없음을 반환합니다.

비동기 호출이 이루어집니다,하지만 결코 서버로 이동하지 않고 그 그것은 바로 서비스 "를 찾을 수 없습니다"것 콜백

관련 문제