<channelSinkProviders> 項目
本主題專門說明一項為了在現有應用程式中提供回溯相容性而保留的舊有技術,不建議用於新的開發工作。分散式應用程式應使用 Windows Communication Foundation (WCF) 進行開發。
包含用戶端和伺服器通道接收提供者的樣板。任何指定在這個項目下的通道接收提供者可以在可能註冊通道接收提供者的任何位置上被參考。這個項目可能出現在應用程式組態檔 (電腦組態檔) 中。
Schema Hierarchy
<configuration>
<system.runtime.remoting> 項目
<channelSinkProviders> 項目
語法
<channelSinkProviders>
<serverProviders>
<clientProviders>
</<channelSinkProviders>
屬性和元素
下列章節會說明屬性 (Attribute)、子項目和父項目。
屬性
無。
項目子系
項目 | 說明 |
---|---|
包含可插入伺服器通道呼叫鏈結的通道接收樣板。這個項目可以在 <channelSinkProviders> 項目中出現一次。 |
|
包含可插入用戶端通道呼叫鏈結的通道接收樣板。這個項目可以在 <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" someProperty="xyz" />
<endpoint url="contoso.com:9001" someProperty="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>
另請參閱
參考
概念
建置日期:2010-02-13