ChannelServices.RegisterChannel 메서드

정의

오버로드

RegisterChannel(IChannel)
사용되지 않음.

채널을 채널 서비스에 등록합니다. RegisterChannel(IChannel)는 사용되지 않습니다. 대신 RegisterChannel(IChannel, Boolean)를 사용하십시오.

RegisterChannel(IChannel, Boolean)

채널을 채널 서비스에 등록합니다.

RegisterChannel(IChannel)

주의

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

채널을 채널 서비스에 등록합니다. RegisterChannel(IChannel)는 사용되지 않습니다. 대신 RegisterChannel(IChannel, Boolean)를 사용하십시오.

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)

매개 변수

chnl
IChannel

등록할 채널입니다.

특성

예외

chnl 매개 변수가 null인 경우

채널이 이미 등록되었습니다.

호출 스택의 상위 호출자 중 하나 이상에게 원격 형식 및 채널을 구성하기 위한 권한이 없는 경우

예제

HttpChannel^ channel = gcnew HttpChannel( 9000 );
ChannelServices::RegisterChannel( channel, false );
RemotingConfiguration::RegisterWellKnownServiceType( SampleNamespace::SampleService::typeid, "MySampleService/SampleService::soap", WellKnownObjectMode::Singleton );
Console::WriteLine( "** Press enter to end the server process. **" );
Console::ReadLine();
HttpChannel channel = new HttpChannel(9000);
ChannelServices.RegisterChannel(channel);

RemotingConfiguration.RegisterWellKnownServiceType( typeof(SampleService),
"MySampleService/SampleService.soap", WellKnownObjectMode.Singleton);

Console.WriteLine("** Press enter to end the server process. **");
Console.ReadLine();
Dim channel As New HttpChannel(9000)
ChannelServices.RegisterChannel(channel)
RemotingConfiguration.RegisterWellKnownServiceType(GetType(SampleService), "MySampleService/SampleService.soap", WellKnownObjectMode.Singleton)

Console.WriteLine("** Press enter to end the server process. **")
Console.ReadLine()

설명

참고

RegisterChannel(IChannel)는 사용되지 않습니다. 대신 RegisterChannel(IChannel, Boolean)를 사용하십시오.

메서드는 RegisterChannel 채널 개체의 IChannel 인터페이스를 사용합니다. 채널은 ChannelName 고유해야 하며 채널은 익명이어야 합니다. 가 로 설정되거나 구성 속성을 사용하여 설정된 경우 IChannel.ChannelName 채널은 익명입니다name.Emptynull

에서 이름이 같은 AppDomain두 채널을 등록할 수 없습니다. 기본적으로 의 HttpChannel 이름은 "http"이고 의 TcpChannel 이름은 "tcp"입니다. 따라서 동일한 형식의 두 채널을 등록하려면 구성 속성을 통해 해당 채널 중 하나에 대해 다른 이름을 지정해야 합니다.

채널 구성 속성에 대한 자세한 내용은 및 <channel> 요소(템플릿)를 참조HttpChannel하세요.

적용 대상

RegisterChannel(IChannel, Boolean)

채널을 채널 서비스에 등록합니다.

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)

매개 변수

chnl
IChannel

등록할 채널입니다.

ensureSecurity
Boolean

보안을 설정하려면 true이고, 그렇지 않으면 false입니다. 값을 false로 설정해도 TCP 또는 IPC 채널의 보안 설정에는 영향을 미치지 않습니다.

예외

chnl 매개 변수가 null인 경우

채널이 이미 등록되었습니다.

호출 스택의 상위 호출자 중 하나 이상에게 원격 형식 및 채널을 구성하기 위한 권한이 없는 경우

HttpServerChannel에는 지원되지 않습니다. 보안 HTTP 채널이 필요한 경우에는 IIS(인터넷 정보 서비스)를 사용하여 서비스를 호스팅합니다.

설명

메서드는 RegisterChannel(IChannel, Boolean) 채널 개체에서 인터페이스를 받 IChannel 습니다. 채널은 ChannelName 고유해야 하며 채널은 익명이어야 합니다. 가 로 설정되거나 구성 속성을 사용하여 설정된 경우 IChannel.ChannelName 채널은 익명입니다name.Emptynull

에서 이름이 같은 AppDomain두 채널을 등록할 수 없습니다. 기본적으로 의 HttpChannel 이름은 "http"이고 의 TcpChannel 이름은 "tcp"입니다. 따라서 동일한 형식의 두 채널을 등록하려면 구성 속성을 통해 해당 채널 중 하나에 대해 다른 이름을 지정해야 합니다.

채널 구성 속성에 대한 자세한 내용은 채널 및 포맷터 구성 속성<채널> 요소(템플릿)를 참조하세요.

매개 변수가 ensureSecurity 로 설정된 true경우 원격 시스템은 채널이 를 구현 ISecurableChannel하는지 여부를 결정하고, 그렇다면 암호화 및 디지털 서명을 사용하도록 설정합니다. 채널이 를 구현 ISecurableChannel하지 않으면 예외가 throw됩니다.

참고

를 로 설정 ensureSecurity 하면 true 모든 플랫폼에서 채널에 대한 가 HttpServerChannel throw RemotingException 됩니다. 보안 http 채널을 사용하려면 IIS에서 서비스를 호스트해야 합니다.

적용 대상