I have a WCF service implemented with a call back contract that I am trying to send a business object through. I have the business object decorated with DataContract() and DataMember() attributes, and it contains the following number of properties:
- ints: 3
- strings: 4
- XElement: 1
- other objects: 5 (also decorated with DataContract() and DataMember()
Whenever I try and send this object over the callback, the service times-out. I have tried creating other objects with fewer properties to send through the callback, and can get it to go through if there is only one property, but if I have any more than one property, the service times out.
Is there something wrong in my configuration? I have tried the default wsDualHttpBinding, as well as a customBinding (as displayed below) and I have tried all sorts of different settings with the maxBufferSize, maxBufferPoolSize, and maxReceivedMessageSize. I don’t want to increase the timeout, as I would like this object to arrive to my client fairly quickly. Please somebody help me…if I had any hair left I would have pulled it out by now!!!!!
I have configured my service as such:
Server Configuration:
<customBinding>
<binding name="DualBindingConfig">
<reliableSession flowControlEnabled="true" maxPendingChannels="128" />
<compositeDuplex />
<oneWay/>
<binaryMessageEncoding/>
<httpTransport maxReceivedMessageSize="655360000" maxBufferPoolSize="655360000" />
</binding>
</customBinding>
<services>
<service behaviorConfiguration="Agent_Utility_WCF.Callback.AgentMessagingBehavior"
name="Agent_Utility_WCF.Callback.AgentMessaging">
<endpoint address="" binding="customBinding" bindingConfiguration="DualBindingConfig" bindingName="AgentMessaging" contract="Agent_Utility_WCF.Callback.IAgentMessaging">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Agent_Utility_WCF.Callback.AgentMessagingBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceThrottling maxConcurrentCalls="160" maxConcurrentSessions="100"/>
</behavior>
</serviceBehaviors>
</behaviors>
Client Configuration:
<bindings>
<customBinding>
<binding name="AgentMessaging_IAgentMessaging">
<reliableSession acknowledgementInterval="00:00:00.2000000" flowControlEnabled="true"
inactivityTimeout="00:10:00" maxPendingChannels="4" maxRetryCount="8"
maxTransferWindowSize="8" ordered="true" reliableMessagingVersion="Default" />
<compositeDuplex />
<oneWay maxAcceptedChannels="10" packetRoutable="false">
<channelPoolSettings idleTimeout="00:02:00" leaseTimeout="00:10:00"
maxOutboundChannelsPerEndpoint="10" />
</oneWay>
<binaryMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
maxSessionSize="2048">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binaryMessageEncoding>
<httpTransport manualAddressing="false" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous"
realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
useDefaultWebProxy="true" />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://localhost:666/Callback/AgentMessaging.svc"
binding="customBinding" bindingConfiguration="AgentMessaging_IAgentMessaging"
contract="AgentMessaging.IAgentMessaging" name="AgentMessaging_IAgentMessaging">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
Add the following to your web.config:
Then invoke your web service method. This will generate WcfDetailTrace.svclog in the root of your web site. Open this file with SvcTraceViewer.exe. This should give you pretty much information on what’s going on.