tags:

views:

109

answers:

3
A: 

You show an exception on the client; what happens when you attach a debugger on the server (or turn on logging), see anything useful there?

Brian
There is no error on the server side. It successfully constructs and returns the return object.
Nathan Ridley
Hm. Any chance server and client have mismatched contracts (e.g. server contract changed, but client did not)? Might need to use e.g. Fiddler to see what's going on the wire.
Brian
No, I ran an update on the service reference just to check.
Nathan Ridley
Do other methods on the contract interface work? What if you just return an 'int'? I would guess serialization maybe next, and try various data types to see if you can come up with conditions for it failing/succeeding...
Brian
I have another service side by side which returns simpler types and it works fine.
Nathan Ridley
Sounds like you have a recipe for a binary search of the problem. You have a service with simple types that works. You have a service with complex types that doesn't. Start transforming the simple one into the complex one, step by step, until it fails, and find different axes of failure, until you understand the issue.
Brian
A: 

This might be caused by a message too long. You should try to change the limits by editing your app.config like this:

<binding name="WebBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
  <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
    maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
Brann
Thanks for the response. The third sentence in the opening paragraph of the question reads: "In my debugging, the total byte size of the serialized message is well under the default 65535 byte threshold."
Nathan Ridley
@Nathan : the message length is not the only meaningfull threshold. Namely, check the maxArrayLength parameter
Brann
Have tried that too, cheers. Still get the error though.
Nathan Ridley
A: 

Could it be that your server just takes a tad too long to put together the response? The default "sendTimeout" on the client is only 60 seconds - you could try to increase that to something higher:

<binding name="TweakedBinding" sendTimeout="120" />

What does your client config look like? What binding are you using? What security settings?

Marc

UPDATE:
could you add the service debug behavior to your service, so that you'd get more debug and error info on the client end when something goes wrong??

<behaviors>
  <serviceBehavior>
    <behavior name="YourBehaviorName">
       <serviceDebug includeExceptionDetailInFaults="True" />
    </behavior>
  </serviceBehavior>
</behaviors>
marc_s
No, the response is very quick. I've just updated the question to show a screenshot of the debugger info.
Nathan Ridley
The binding and security configuration are all default values generated by Visual Studio. The service is via ASP.Net and set to run via IIS rather than the built-in web server.
Nathan Ridley