0
我使用basicHttpBinding的我的WCF服務WCF服務的最佳配置
<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
,開/關和接收超時。如果我將它設置爲允許的最大值,那麼這樣做會有什麼傷害嗎?
應該如何最優地定義大小和超時值?