Compartir vía


ChannelServices.RegisterChannel Método

Definición

Sobrecargas

Nombre Description
RegisterChannel(IChannel)
Obsoletos.

Registra un canal con los servicios del canal. RegisterChannel(IChannel) está obsoleto. Utilice RegisterChannel(IChannel, Boolean) en su lugar.

RegisterChannel(IChannel, Boolean)

Registra un canal con los servicios del canal.

RegisterChannel(IChannel)

Precaución

Use System.Runtime.Remoting.ChannelServices.RegisterChannel(IChannel chnl, bool ensureSecurity) instead.

Registra un canal con los servicios del canal. RegisterChannel(IChannel) está obsoleto. Utilice RegisterChannel(IChannel, Boolean) en su lugar.

public:
 static void RegisterChannel(System::Runtime::Remoting::Channels::IChannel ^ chnl);
public static void RegisterChannel(System.Runtime.Remoting.Channels.IChannel chnl);
[System.Obsolete("Use System.Runtime.Remoting.ChannelServices.RegisterChannel(IChannel chnl, bool ensureSecurity) instead.", false)]
public static void RegisterChannel(System.Runtime.Remoting.Channels.IChannel chnl);
static member RegisterChannel : System.Runtime.Remoting.Channels.IChannel -> unit
[<System.Obsolete("Use System.Runtime.Remoting.ChannelServices.RegisterChannel(IChannel chnl, bool ensureSecurity) instead.", false)>]
static member RegisterChannel : System.Runtime.Remoting.Channels.IChannel -> unit
Public Shared Sub RegisterChannel (chnl As IChannel)

Parámetros

chnl
IChannel

Canal que se va a registrar.

Atributos

Excepciones

El chnl parámetro es null.

El canal ya se ha registrado.

Al menos uno de los autores de llamada más altos en la pila de llamadas no tiene permiso para configurar tipos y canales de comunicación remota.

Comentarios

Nota:

RegisterChannel(IChannel) está obsoleto. Utilice RegisterChannel(IChannel, Boolean) en su lugar.

El RegisterChannel método toma la IChannel interfaz de un objeto channel. El valor del ChannelName canal debe ser único o el canal debe ser anónimo. Un canal es anónimo si IChannel.ChannelName se establece en o nullEmpty mediante la name propiedad de configuración.

No se pueden registrar dos canales con el mismo nombre en .AppDomain De forma predeterminada, el nombre de es HttpChannel "http" y el nombre de es TcpChannel "tcp". Por lo tanto, si desea registrar dos canales del mismo tipo, debe especificar un nombre diferente para uno de ellos a través de las propiedades de configuración.

Para obtener más información sobre las propiedades de configuración del canal, vea HttpChannel.

Se aplica a

RegisterChannel(IChannel, Boolean)

Registra un canal con los servicios del canal.

public:
 static void RegisterChannel(System::Runtime::Remoting::Channels::IChannel ^ chnl, bool ensureSecurity);
public static void RegisterChannel(System.Runtime.Remoting.Channels.IChannel chnl, bool ensureSecurity);
static member RegisterChannel : System.Runtime.Remoting.Channels.IChannel * bool -> unit
Public Shared Sub RegisterChannel (chnl As IChannel, ensureSecurity As Boolean)

Parámetros

chnl
IChannel

Canal que se va a registrar.

ensureSecurity
Boolean

true garantiza que la seguridad esté habilitada; de lo contrario false, es . Establecer el valor false en no afecta a la configuración de seguridad en el canal TCP o IPC.

Excepciones

El chnl parámetro es null.

El canal ya se ha registrado.

Al menos uno de los autores de llamadas superiores en la pila de llamadas no tiene permiso para configurar tipos y canales de comunicación remota.

No se admite para HttpServerChannel. Hospede el servicio mediante Internet Information Services (IIS) si necesita un canal HTTP seguro.

Comentarios

El RegisterChannel(IChannel, Boolean) método recibe la IChannel interfaz de un objeto de canal. El valor del ChannelName canal debe ser único o el canal debe ser anónimo. Un canal es anónimo si IChannel.ChannelName se establece en o nullEmpty mediante la name propiedad de configuración.

No se pueden registrar dos canales con el mismo nombre en .AppDomain De forma predeterminada, el nombre de es HttpChannel "http" y el nombre de es TcpChannel "tcp". Por lo tanto, si desea registrar dos canales del mismo tipo, debe especificar un nombre diferente para uno de ellos a través de las propiedades de configuración.

Si el ensureSecurity parámetro se establece trueen , el sistema de comunicación remota determina si el canal implementa ISecurableChannely, si es así, habilita el cifrado y las firmas digitales. Se produce una excepción si el canal no implementa ISecurableChannel.

Nota:

Si se ensureSecurity establece en true , se produce un RemotingException para el HttpServerChannel canal en todas las plataformas. Debe hospedar el servicio en IIS si desea usar un canal HTTP seguro.

Se aplica a