views:

79

answers:

1

I have defined a binding that I use to connect to two different services. One I call my Master service that provides configuration information to my program and tells it which Local service to connect to. The Local service returns, along with other things, items that allow me to draw map lines and an MP3 as a file stream. The MP3 can be upto 10 MB and the Maplines can have 10,000 records that I zip and return as a byte array. I have increased most of the default binding settings to get the data to return, the audio was the bigest cause of the increase. I do not understand the various settings in the binding and have increased them very liberally. How do I determine the right size for these settings and am I taking a penatly by increasing them? Thanks.

<binding name="netTCPActivity" closeTimeout="01:30:00" openTimeout="01:15:00"
      receiveTimeout="01:10:00" sendTimeout="01:15:00" transactionFlow="false"
      transferMode="Buffered" transactionProtocol="OleTransactions"
      hostNameComparisonMode="StrongWildcard" listenBacklog="100"
      maxBufferPoolSize="152428800" maxBufferSize="50000000" maxConnections="30"
      maxReceivedMessageSize="50000000" portSharingEnabled="true">
      <readerQuotas maxDepth="32" maxStringContentLength="81920" maxArrayLength="6638400"
        maxBytesPerRead="4096" maxNameTableCharCount="563840" />
      <reliableSession ordered="true" inactivityTimeout="00:10:00"
        enabled="false" />
      <security mode="None" />
    </binding>
A: 

Like any limits and quotas they are there to prevent bad things to happen. For example, if there were no limit on simultaneous connections or incoming message size, a single malicious or selfish user can hog the resource. If the timeout is too long, a server-side error can cause the client program to wait very long. For small scale usage I think you can keep the default values until some problem happens, and adjust the values as needed.

eed3si9n