一般通道屬性
下表說明一般通道屬性並列出支援這些屬性的通道型別。
屬性 | 說明 | 支援這個屬性的型別 | ||
---|---|---|---|---|
name |
字串,指定此通道的名稱。如果您沒有指定名稱,會按照下列型別使用預設名稱: HttpChannel:"http" HttpClientChannel:"http client" HttpServerChannel:"http server" TcpChannel:"tcp" TcpClientChannel:"tcp client" TcpServerChannel:"tcp server" IpcChannel:"ipc" IpcClientChannel:"ipc client" IpcServerChannel:"ipc server" 每個通道必須具有唯一名稱。如果您想要呼叫名稱,但是想要避免命名衝突,請將此屬性設為空字串 ("" 或 String.Empty)。系統可允許使用任何數量的通道 (前提是 name 必須等於 String.Empty)。當呼叫 ChannelServices.GetChannel 方法時,會使用這個屬性來擷取特定通道。如需詳細資訊,請參閱通道。 |
|||
machineName |
指定與目前通道共用的電腦名稱的字串。如果搭配伺服器通道使用,則會覆寫 useIpAddress。
|
HttpChannel HttpClientChannel HttpServerChannel TcpChannel TcpClientChannel TcpServerChannel |
||
priority |
整數,表示指派給此通道的優先權。數值越高,表示被選上優先連接的機會越高。預設優先權是 1,並允許使用負數。 |
HttpChannel HttpServerChannel HttpClientChannel TcpChannel TcpClientChannel TcpServerChannel IpcChannel IpcClientChannel IpcServerChannel |
||
secure (TcpChannel) |
布林值 (true 或 false),指定通道上的通訊是否安全。預設為 false。如果設為 true,則 tokenImpersonationLevel 屬性將設為 Identification 且 protectionLevel 屬性將設為 EncryptAndSign。請注意,安全的 TcpClientChannel 只能連接至安全的 TcpServerChannel,而不安全的 TcpClientChannel 也只能連接至不安全的 TcpServerChannel。
|
TcpChannel TcpClientChannel TcpServerChannel |
||
secure (IpcChannel) |
布林值 (true 或 false),指定通道上的通訊是否安全。預設為 false。當設定為 true 時,tokenImpersonationLevel 屬性會設定為 Identification。請注意,安全的 IpcClientChannel 可以連接至安全的或不安全的 IpcServerChannel,但是不安全的 IpcClientChannel 只能連接至不安全的 IpcServerChannel。 |
IpcChannel IpcClientChannel IpcServerChannel |
||
protectionLevel |
型別 ProtectionLevel 的值。預設為 None,除非 secure 屬性設為 true,在此情況下預設為 EncryptAndSign。您必須將 secure 屬性設為 true,以便將 ProtectionLevel 屬性設為 None 以外的任何值。 請注意,None 是唯一與 Windows 95、Windows 98,或 Windows Me 相容的設定。 |
TcpClientChannel TcpServerChannel |
請參閱
工作
HOW TO:在組態檔中設定通道
HOW TO:以程式設計方式設定通道
參考
概念
Copyright © 2007 by Microsoft Corporation. All rights reserved.