【发布时间】:2014-03-28 19:54:42
【问题描述】:
我正在为我的 wcf 服务使用 basicHttpBinding
<basicHttpBinding>
<binding name="BasicHttpBinding_UtilityService"
closeTimeout="01:00:00" openTimeout="01:00:00"
receiveTimeout="01:00:00" sendTimeout="01:00:00"
allowCookies="false" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="52428800" maxBufferPoolSize="52428800"
maxReceivedMessageSize="52428800"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas
maxDepth="52428800" maxStringContentLength="52428800"
maxArrayLength="52428800" maxBytesPerRead="52428800"
maxNameTableCharCount="52428800"/>
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
<message clientCredentialType="UserName" algorithmSuite="Default"/>
</security>
</binding>
</basicHttpBinding>
<behavior name="httpMetadataBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
<dataContractSerializer maxItemsInObjectGraph="52428800" />
<serviceThrottling maxConcurrentCalls="200" maxConcurrentSessions="200" maxConcurrentInstances="200" />
</behavior>
请告诉我应该为maxArrayLength、maxItemsInObjectGraph、打开/关闭和接收超时设置什么值。如果我将其设置为最大允许值,这样做有什么害处吗?
应该如何以最佳方式定义大小和超时值?
【问题讨论】:
标签: wcf binding configuration