共用方式為


<channelSinkProviders> 項目

包含用戶端和伺服器通道接收提供者的樣板。任何指定在這個項目下的通道接收提供者可以在可能註冊通道接收提供者的任何位置上被參考。

<configuration> 項目
  <system.runtime.remoting> 項目
    <channelSinkProviders> 項目

<channelSinkProviders> 
   <serverProviders> 
   <clientProviders> 
</<channelSinkProviders>

屬性和項目

下列小節將說明屬性、子項目和父項目。

屬性

子項目

項目 說明

<serverProviders>

包含可以插入伺服器通道呼叫鏈結中的通道接收樣板。這個項目可以在 <channelSinkProviders> 項目中出現一次。

<clientProviders>

包含可以插入用戶端通道呼叫鏈結中的通道接收樣板。這個項目可以在 <channelSinkProviders> 項目中出現一次。

父項目

項目 說明

configuration

Common Language Runtime 和 .NET Framework 應用程式所使用之每個組態檔中的根項目。

system.runtime.remoting

包含有關遠端物件和通道的資訊。

範例

下列組態檔使用 <provider> 執行個體項目,以指派 propsetter 和 null 通道接收提供者 (是以 <provider> 樣板項目宣告的) 給 HttpChannel。此外,"propsetter" 通道接收提供者是以訂提供者屬性 (Property) 所建立的,而這些屬性 (Property) 已指定為提供者執行個體項目上的屬性 (Attribute),以及子代 <endpoint> 屬性 (Attribute) 的名稱/值組。

<configuration>
   <system.runtime.remoting>
      <application>
         <client>
            <wellknown 
               type="RemoteType, RemoteAssembly"
               url="http://computername:8080/RemoteType.rem"/>
         </client>
         <channels>
            <channel ref="http">
               <clientProviders>
                  <formatter ref="soap"/>
                  <provider 
                     ref="propsetter" 
                     username="bob" 
                     writeToConsole="true"
                  >
                     <endpoint url="contoso.com:9000" password="xyz" />
                     <endpoint url="contoso.com:9001" password="123" />
                  </provider>
                  <provider ref="null" writeToConsole="true" />
               </clientProviders>
            </channel>
         </channels>
      </application>
      <channelSinkProviders>
         <clientProviders>
            <provider 
               id="propsetter" 
               type="ChannelSinkPropertySetterProvider, SinkAssembly" 
            />
            <provider 
               id="null" 
               type="NullSinkProvider, SinkAssembly" 
            />
         </clientProviders>
      </channelSinkProviders>
      <debug loadTypes="true" />
   </system.runtime.remoting>
</configuration>

請參閱

參考

遠端設定結構描述

概念

接收和接收鏈結