关于Remoting的配置文件
服务器端的配置文件如下
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application name="HelloServer">
<service>
<wellknown mode="Singleton"
type="HelloLib.Hello,HelloLib"
objectUri="Hi"/>
</service>
<channels>
<channel type="System.Runtime.Remoting.Channels.Tcp.TcpChannel,System.Runtime.Remoting" port="8086"/>
<channel type="System.Runtime.Remoting.Channels.Http.HttpChannel,System.Runtime.Remoting" port="8085"/>
</channels>
</application>
</system.runtime.remoting>
</configuration>
客户端的配置文件如下
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application name="HelloClient">
<client url="tcp://wjj:8086/HelloServer">
<wellknown type="HelloLib.Hello,HelloLib"
url="tcp://wjj:8086/HelloServer/Hi"/>
</client>
<channels>
<channel type="System.Runtime.Remoting.Channels.Tcp.TcpChannel,System.Runtime.Remoting"/>
<channel type="System.Runtime.Remoting.Channels.Http.HttpChannel,System.Runtime.Remoting"/>
</channels>
</application>
</system.runtime.remoting>
</configuration>
服务器可以正确启动,可是客户端启动抛出异常所Tcp信道已被占用,请问如何解决?
把端口声明更改为
<channel ref="tcp"/>也不行的
另外,请推荐几本关于Remoting方面的好书