下表描述常规信道属性并列出支持这些属性的信道类型。
| 属性 | 说明 | 支持此属性的类型 | ||
|---|---|---|---|---|
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 |
请参见
任务
参考
概念
.gif)
版权所有 (C) 2007 Microsoft Corporation。保留所有权利。
注意: