WCF response error. RRS feed

  • Question

  •  Hi,

    WCF behaving weirdly when sending huge amount of data.

    I am using net tcp wcf service with all the settings like receiving size, buffer size and all time outs to it's max value.

    When I send small amount of data I am getting response back, but unfortunately when I send huge data even though operation get successful at server end i am not getting any response. It only errors out when time out mentioned in config file i.e. 1 hr  is elapsed. 

    Friday, February 28, 2014 9:43 AM


All replies

  • Sounds like it could be a data contract serializer issue, but that is a guess with limited information. I have had to increase maxItemsInObjectGraph before in the past. This is in a behavior.

    <behavior name="mybehavior">
    <dataContractSerializer maxItemsInObjectGraph="50000000" />

    Please provide more information. Are you getting an exception? What does it say?

    Are you using inheritance in your data contracts? You may need to use the knowntype attribute.

    Friday, February 28, 2014 3:14 PM
  • First of all thanks for your reply !!!

    Le t me explain this in detail

    I have azure based WCF service hosted using http protocol. This service internally use net tcp based service.

    Client app has access to http based service. When I send small amount of data (i.e. 500 users). Method requires 1-3 minutes for operation to get complete and after that client app is getting proper response. But when I send huge data which may require more than 5 min to get processed,  even though operation is successful client app did not received any response from service. There is no exceptions in service. I have timeout set to 1 hour. Even though operation gets completed in 8 min, client app continue to wait until timeout mentioned in config file gets elapsed. After this I am getting standard timeout error.

    I have inheritance and also I have used know type attributes. weird thing is that  If I call get operation which may have more data than which i am sending in save operation, I am getting response back properly. 

    Sunday, March 2, 2014 7:05 PM
  • Hello,

    I encourage you to rethink the design.  1 hour timeouts for http sounds like a candidate for a callback scenario or would even work better to submit the information into a workqueue and then poll for the results.

    Take a look at some of the following to support my suggestion:


    Sunday, March 2, 2014 8:15 PM