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>
4

1 回答 1

0

就像任何限制和配额一样,它们的存在是为了防止坏事发生。例如,如果对同时连接或传入消息大小没有限制,则单个恶意或自私的用户可以占用资源。如果超时时间过长,服务器端错误可能会导致客户端程序等待很长时间。对于小规模使用,我认为您可以保留默认值,直到出现问题,并根据需要调整值。

于 2009-04-28T23:35:08.753 回答