Добрый день
Необходимо подключится через tcp к серверу для вызова методов удаленного объекта.
Нашел пример в MSDN
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
namespace RemotingSamples {
public class Client {
public static int Main(string [] args) {
TcpChannel chan = new TcpChannel();
ChannelServices.RegisterChannel(chan);
HelloServer obj = (HelloServer)Activator.GetObject(
typeof(RemotingSamples.HelloServer),
"
tcp://localhost:8085/SayHello");
if (obj == null) System.Console.WriteLine("Could not locate server");
else Console.WriteLine(obj.HelloMethod("Caveman"));
return 0;
}
}
}
но на строчке using System.Runtime.Remoting.Channels.Tcp; выдается ошибка
The type or namespace name 'Tcp' does not exist in the class or namespace 'System.Runtime.Remoting.Channels' (are you missing an assembly reference?)
В чем может быть проблема?
Здравствуйте, Chardex, Вы писали:
C>Здравствуйте, av0000, Вы писали:
A>>В чем может быть проблема?
C>Добавить reference на System.Runtime.Remoting.dll
Все ОК.

И еще вопрос где-то есть примеры конфигурационных файлов для указалиня параметров удаленного объекта
в частности интересует настройка через tcp, вызов методов идет через ссылку интерфейс.