wcf上傳文件
A. wcf技術能否支持大批量文件傳輸
支持,只要幫定的協議恰當,對封包大小限制合理,就可以大批量傳問題和傳大容量文件. 
而且WCF支持Stream傳輸文件.
B. WCF中使用MTOM方式傳送文件的問題
應該不需要!~~~
因為上傳控制項是伺服器控制項  所有操作都在伺服器端進行 客戶端只是上付給一個上傳的地址而已!
C. 如何獲取其他伺服器上的文件
在客戶端伺服器的WCF服務代碼里調用ReadFile方法,傳入公司伺服器上文件的物理路徑,即可在客戶端伺服器端獲取到公司伺服器文件的二進制流了,之後可以保存下來,也可以直接回發給客戶客戶端
可以用SQL語句來獲取文件:
select T.c from  openrowset(bulk N'D:\DB_Backup\E5KST01\audit_trail_20130419.bak', single_blob) T(c)
D. wcf 服務的配置文件怎麼還有Client
按照我的理解,這里的client是指你在代碼中實例化一個client的默認配置。
SampleServiceClient wcfClient = new SampleServiceClient(); //這個client的默認配置
wcfClient.SampleMethod();
wcfClient.Close();
屬性說明:
address - ServiceHost的這個Endpoint的address
binding - 指定這個Endpoint使用的binding,這個binding可以是系統預定義的9個binding之一,比如是basicHttpBinding
contract - 指定這個Endpoint對應的Contract的全限定名(名稱空間.類型名)
name - Endpoint的名稱,客戶端代理類的構造方法中的endpointConfigurationName對應到這個name
bindingConfiguration - 指定客戶端binding的具體設置,指向<bindings>元素下同類型binding的name
如果有多個endpoint,系統會默認使用最後一個endpoint的配置。
E. wcf的配置文件應該添加在什麼地方
缺少基於HTTP協議的URL進行連接
經過測試一下是可以運行的App.config文件內容
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.web>
    <compilation debug="true" />
  </system.web>
  <!-- 部署服務庫項目時,必須將配置文件的內容添加到 
  主機的 app.config 文件中。System.Configuration 不支持庫的配置文件。-->
  <system.serviceModel>
    <services>
      <service name="WcfServiceLibrary1.Service1" behaviorConfiguration="WcfServiceLibrary1.Service1Behavior">
        <host>
          <baseAddresses>
            <add baseAddress = "http://localhost:8731/Design_Time_Addresses/WcfServiceLibrary1/Service1/" />
            <add baseAddress = "net.tcp://localhost:8080/Design_Time_Addresses/WcfServiceLibrary1/Service1/" />
          </baseAddresses>
        </host>
        <!-- Service Endpoints -->
        <!-- 除非完全限定,否則地址將與上面提供的基址相關 -->
        <!--<endpoint address ="" binding="wsHttpBinding" contract="WcfServiceLibrary1.IService1">
          --><!-- 
              部署時,應刪除或替換下列標識元素,以反映
              在其下運行部署服務的標識。刪除之後,WCF 將
              自動推導相應標識。
          --><!--
          <identity>
            <dns value="localhost"/>
          </identity>
        </endpoint>-->
        <endpoint address ="tcp" binding="netTcpBinding" contract="WcfServiceLibrary1.IService1">
          <identity>
            <dns value="localhost"/>
          </identity>
        </endpoint>
        <!-- Metadata Endpoints -->
        <!-- 元數據交換終結點由服務用於向客戶端做自我描述。--> 
        <!-- 此終結點不使用安全綁定,應在部署前確保其安全或將其刪除-->
        <!--<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>-->
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="WcfServiceLibrary1.Service1Behavior">
          <!-- 為避免泄漏元數據信息,
          請在部署前將以下值設置為 false 並刪除上面的元數據終結點  -->
          <serviceMetadata httpGetEnabled="True"/>
          <!-- 要接收故障異常詳細信息以進行調試, 
          請將下值設置為 true。在部署前 
            設置為 false 以避免泄漏異常信息-->
          <serviceDebug ="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>
