Matt
Matt

Reputation: 27011

Is there a size limit to the amount of data you can send to a WCF service?

Is there a size limit to the amount of data you can send to a WCF service? I send an array of objects over and when the array gets to be a certain size, I get a 404 bad request exception.

Is this a limit of httpHosting? Would another type of hosting work better?

Upvotes: 4

Views: 5538

Answers (1)

Russell
Russell

Reputation: 17737

There is a maximum array size and maximum content size. Here is the XML (put in your App.config) to increase the size.

specify net tcp binding config:

    <bindings>
        <netTcpBinding>
          <binding name="TCPSession"  
closeTimeout="01:01:00"
            openTimeout="01:01:00" receiveTimeout="01:10:00" sendTimeout="01:01:00"
            transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
            hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="2147483647"
            maxBufferSize="2147483647" maxConnections="10" maxReceivedMessageSize="2147483647"
        </netTcpBinding>
      </bindings>

Upvotes: 2

Related Questions