WCF做上传,不管是单个客户端上传还是同时有好几个上传,服务器只接收385M就停止了,是怎么回事?配置如下:
服务端
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<httpRuntime maxRequestLength="2147483647" />
</system.web>
<appSettings>
<add key="filePath" value="E:\Download" />
</appSettings>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="StreamedHTTP" maxReceivedMessageSize="9223372036854775807" messageEncoding="Mtom" transferMode="Streamed" sendTimeout="00:30:00" >
<readerQuotas maxArrayLength="2147483647"/>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="DefaultBehavior" name="ZXWCFService">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="StreamedHTTP"
contract="IZXWCFService" />
<host>
<baseAddresses>
<add baseAddress="http://localhost/ZXWeb/ZXWCFService.svc" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="DefaultBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceThrottling maxConcurrentCalls="1000" maxConcurrentInstances="1000" maxConcurrentSessions="1000"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> </system.serviceModel>
</configuration>
客户端
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<httpRuntime maxRequestLength="2147483647" />
</system.web>
<appSettings>
<add key="filePath" value="E:\Upload1" />
</appSettings>
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.; Initial Catalog=TestDB1; User ID=sa; Password=123" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IZXWCFService" closeTimeout="00:05:00"
openTimeout="00:05:00" receiveTimeout="00:10:00" sendTimeout="00:05:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="9223372036854775807"
messageEncoding="Mtom" textEncoding="utf-8" transferMode="Streamed"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost/ZXWeb/ZXWCFService.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IZXWCFService" contract="ZXWCFService.IZXWCFService"
name="BasicHttpBinding_IZXWCFService" />
</client>
</system.serviceModel>
</configuration>