Geeks With Blogs
I [heart] code! .NET musings from the chick side
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>

Posted on Wednesday, September 9, 2009 1:58 PM | Back to top


Comments on this post: Big Huge Objects and WCF

# re: Big Huge Objects and WCF
Requesting Gravatar...
This is interesting is it a new attribute or has it always been there?

Left by lucas on Sep 10, 2009 11:40 AM

# re: Big Huge Objects and WCF
Requesting Gravatar...
Thanks for your useful info.
Left by cheap jordan shoes on Sep 12, 2009 1:43 AM

# re: Big Huge Objects and WCF
Requesting Gravatar...
This is the great article to read.
Left by used bobcats for sale on Oct 20, 2010 1:53 AM

# Mrs
Requesting Gravatar...
This is s very well written article.The information provided is very good.
Left by internet marketing strategy on Nov 25, 2010 1:21 AM

# re: Big Huge Objects and WCF
Requesting Gravatar...
This sever side and client side code really its working thanks for sharing it
Left by caterpillar parts on Dec 01, 2010 4:09 AM

# Mr
Requesting 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.
Left by female hair loss treatment on Feb 02, 2011 5:41 AM

# Wart
Requesting 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
Left by www.wart-off.net on Feb 19, 2011 12:37 AM

# re: Big Huge Objects and WCF
Requesting 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 !
Left by treatments for syphilis on Mar 21, 2011 2:36 AM

# Mr
Requesting Gravatar...
Thanks for sharing such an excellent information.This is really a good with all the excellent information
Left by buy a dancing pole on Mar 23, 2011 7:26 AM

# re: Big Huge Objects and WCF
Requesting Gravatar...
very informative post.thanks for sharing.it was really helpful for me
Left by vedic maths on Apr 08, 2011 7:39 AM

# aboutdiscountshopping.com
Requesting Gravatar...
that,s anice post
Left by sam on May 29, 2012 3:31 AM

# re: Big Huge Objects and WCF
Requesting Gravatar...
This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free.
Left by how to have a baby on Jun 02, 2012 1:56 AM

# re: Big Huge Objects and WCF
Requesting Gravatar...
THANKS !!!!!!!!!!!!!!!!!!!!!!!!!
Left by dan on Jun 28, 2012 10:57 AM

Your comment:
 (will show your gravatar)


Copyright © Kirstin Juhl | Powered by: GeeksWithBlogs.net