首页 新闻 会员 周边

WCF配置文件

1
悬赏园豆:40 [已关闭问题] 关闭于 2011-01-10 20:34

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>

问题补充: 高手指点下吧 在线等
262963081的主页 262963081 | 初学一级 | 园豆:90
提问于:2010-12-28 15:26
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册