你在windows窗体的load事件里注册服务器就行了
try:
TcpChannel tcpChannel=new TcpChannel (port);
ChannelServices.RegisterChannel (tcpChannel);
RemotingConfiguration.RegisterActivatedServiceType (typeof(IERD.EtcTag .Data .Bank ));
RemotingConfiguration.RegisterActivatedServiceType (typeof(IERD.EtcTag .Data .BankBinding ));
RemotingConfiguration.RegisterActivatedServiceType (typeof(IERD.EtcTag .Data .Customer ));
RemotingConfiguration.RegisterActivatedServiceType (typeof(IERD.EtcTag .Data .EtcCard  ));
RemotingConfiguration.RegisterActivatedServiceType (typeof(IERD.EtcTag .Data .EtcTagLog ));
RemotingConfiguration.RegisterActivatedServiceType (typeof(IERD.EtcTag .Data .Location ));
RemotingConfiguration.RegisterActivatedServiceType (typeof(IERD.EtcTag .Data .User ));
RemotingConfiguration.RegisterActivatedServiceType (typeof(IERD.EtcTag .Data .Vehicle ));
RemotingConfiguration.RegisterActivatedServiceType (typeof(IERD.EtcTag .Data .VehicleClass ));
RemotingConfiguration.RegisterActivatedServiceType (typeof(IERD.EtcTag .Data .VehicleType ));
RemotingConfiguration.RegisterActivatedServiceType (typeof(IERD.EtcTag .Data .OperatorReport ));