※Remoting(원격작업)
1) 개념 : 원격서버에 있는 개체를 사용하는 기술
=> 분산개체기술 (DCOM(ms), RMI(java))
여러대의PC에서 존재하는 개체를 사용하는 기술
로컬                              개체의 메소드를 호출/ 개체의 데이터를 변경

2) Remoting(원격개체의 메소드 호출) 개발순서
(1) 서버채널생성

TcpChannel : TcpServerChannel(Binary)
HttpChannel : HttpServerChannel(http-soap)

TcpServerChannel channel = new TcpServerChannel(포트번호);

(2) 리모팅 시스템 구동 (=채널 서비스에 채널 등록)
ChannelServices.RegisterChannel(channel);

(3) 원격개체를 등록(여러개가 가능)
가.원격클래스 작성방법
public class 클래스명 : MarshalByRefObject
{
   public 반환형 메소드명(매개변수 리스트) {.....}
   //반환형과 매개변수 리스트는 [Serializable]이 가능해야함
}
나.원격개체를 등록
RemotingConfiguration.RegisterWellKnownServiceType(원격개체를 등록 (1 or 3개));
//1개의 경우 XML파일경로
//3개의 경우 Type, String, WellKnownObjectModel <- 열거형
Type개체 : 원격 클래스의 Type개체
String개체 : 클라이언트가 원격개체 참조를 얻기위한 URL
WellKnownObjectModel  : 원격개체수
ex) RemotingConfiguration.RegisterWellKnownServiceType(
           typeof(원격클래스명),
           "원격클래스명",
           WellKnownObjectModel.SingleTon);//공통으로 액세스 /SingleCall//개별엑세스
tcp://ServerIP:Port/원격클래스명  으로 접속

(4) 원격메소드를 호출하는 클라이언트 개발
가. 클라이언트용 채널 생성
TcpChannel : TcpClientChannel
HttpChannel : HttpClientChannel
//둘중 하나로 서버와 클라이언트가 같게
TcpClientChannel channel = new TcpClientChannel();
ChannelServices.RegisterChannel(channel,true);

나.원격개체 참조얻기
원격 클래스명 -> Calculator calcu = Activator.GetObject(typeof(Calculator),"tcp://localhost:50001/Calculator",)  //Calculator <-원격 클래스명

다. 원격 메소드 호출
double result = calcu.Minus(100,50);
AND