Big Huge Objects and WCF

I had to send a big object across the wire- An collection containing 31,000 objects each with their own complex object graph (don't ask) and I was really running into problems with WCF crapping out on the call.

I did all the obvious stuff to the server web.config...

                 maxBufferSize="2147483647"
                 maxReceivedMessageSize="2147483647" 
                 maxItemsInObjectGraph="2147483647" 

But it still wasn't working.
Luckily I had a few awesome friends come to my rescue: D'Arcy Lussier and Jason Klassen sent me the following- I am posting it here for others. (And so I can find this again later).

server web.config  needed

 

 <serviceBehaviors>

        <behavior name="CustomerBehavior">

          <serviceMetadata httpGetEnabled="true" />

          <serviceDebug includeExceptionDetailInFaults="false" />

          <dataContractSerializer maxItemsInObjectGraph="2147483647" />

        </behavior>

</serviceBehaviors>

 

 

client web.config  needed

 

<behaviors>

      <endpointBehaviors>

        <behavior name="LargeDataBehavior">

          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>   

        </behavior>

      </endpointBehaviors>

</behaviors>

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Wednesday, September 09, 2009 1:58 PM

Feedback

# re: Big Huge Objects and WCF

Left by lucas at 9/10/2009 11:40 AM
Gravatar This is interesting is it a new attribute or has it always been there?

# re: Big Huge Objects and WCF

Left by cheap jordan shoes at 9/12/2009 1:43 AM
Gravatar Thanks for your useful info.

# re: Big Huge Objects and WCF

Left by used bobcats for sale at 10/20/2010 1:53 AM
Gravatar This is the great article to read.

# Mrs

Left by internet marketing strategy at 11/25/2010 1:21 AM
Gravatar This is s very well written article.The information provided is very good.

# re: Big Huge Objects and WCF

Left by caterpillar parts at 12/1/2010 4:09 AM
Gravatar This sever side and client side code really its working thanks for sharing it

# Mr

Left by female hair loss treatment at 2/2/2011 5:41 AM
Gravatar Thanks for providing such useful information.This code snippets are very beneficial. I truly value your professional approach. I would really like to thank you for the efforts you made in writing this particular post. I'm hoping the same from you in the future as well.

# Wart

Left by www.wart-off.net at 2/19/2011 12:37 AM
Gravatar Your work is very good and I appreciate you and hopping for some more informative posts. Thank you for sharing great information to us

# re: Big Huge Objects and WCF

Left by treatments for syphilis at 3/21/2011 2:36 AM
Gravatar
Good post, thanks for taking time to discuss this subject.
Fortunately this topic is presented in your blog, assuring a decent coverage.
Keep up the good work !

# Mr

Left by buy a dancing pole at 3/23/2011 7:26 AM
Gravatar Thanks for sharing such an excellent information.This is really a good with all the excellent information

# re: Big Huge Objects and WCF

Left by vedic maths at 4/8/2011 7:39 AM
Gravatar very informative post.thanks for sharing.it was really helpful for me

Your comment:





 
 

Copyright © Kirstin Juhl

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski