Skip to content

Instantly share code, notes, and snippets.

@davybrion
Created September 9, 2012 12:04
Show Gist options
  • Select an option

  • Save davybrion/3684001 to your computer and use it in GitHub Desktop.

Select an option

Save davybrion/3684001 to your computer and use it in GitHub Desktop.
code snippets for "WCF and large amounts of data" post
<bindings>
<netTcpBinding>
<binding name="MyTcpBinding" maxReceivedMessageSize="2147483647" receiveTimeout="00:30" sendTimeout="00:30">
<readerQuotas maxStringContentLength="8192" maxArrayLength="20971520" />
</binding>
</netTcpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="MyBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
<serviceMetadata />
</behavior>
</serviceBehaviors>
</behaviors>
<service name="Brion.Library.ServerSide.WCF.WcfRequestProcessor" behaviorConfiguration="MyBehavior">
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost/RequestProcessor"/>
</baseAddresses>
</host>
<endpoint contract="Brion.Library.Common.WCF.IWcfRequestProcessor" binding="netTcpBinding"
bindingConfiguration="MyTcpBinding" />
</service>
<client>
<endpoint address="net.tcp://localhost/RequestProcessor" binding="netTcpBinding"
name="IRequestProcessor" bindingConfiguration="MyTcpBinding" behaviorConfiguration="MyBehavior"
contract="Brion.Library.Common.WCF.IWcfRequestProcessor" />
</client>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment