.NET Remoting 客户端在多网卡机器上运行时出现的问题
我构建了一个 .NET 远程客户端,它在单网卡机器上运行得很好,并且通过远程事件接收到了大量测试消息。
但是当添加额外的网卡时,客户端似乎能够连接远程服务器,但测试消息无法再到达。
从调试来看,服务端确实触发了该事件,但客户端没有收到。 google了一下,发现有类似的问题报告: http://www.eggheadcafe.com/community/aspnet/2/ 10061570/reply.aspx
我只是想知道是否有解决方案?
提前致谢!
I built a .NET Remoting Client which works quite fine on the machine of single NIC, and lots of testing messages received via remoting event.
But when additional NIC was added, the Client seemed to be able to connect the remoting Server, but the testing messages cannot arrive anymore.
From debugging, the server end did trigger the event but the client didn't get that. Checking from google and find that a similar problem report:
http://www.eggheadcafe.com/community/aspnet/2/10061570/reply.aspx
I just wonder if any solutions?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这对我来说也是一个问题。
这个问题的本质是客户端如何在服务器上注册事件处理程序。 添加事件处理程序时,客户端将发送“绑定”地址的 IP 地址。 这是 TcpChannel 类中的静态非公共字段(谢谢反射器)。 您需要将客户端显式绑定到服务器能够访问的 IP 地址。 客户端的配置文件应该是这样的。
This was some problem for me also.
The nature of this problem is how client registers the event handlers on the server. When adding an event handler the client is sending the IP address of the "binded" address. This is static non public field in the TcpChannel class (thank you reflector). You need to explicitly bind the client to the ip address that the server will be able to reach. The config file for the client should be something like this.
我在使 .Net Remoting c# 客户端-服务器程序正常工作时遇到问题
并在客户端和客户端之间有路由器时相互连接
服务器。
在客户端设置
useIpAddress= false
示例:
http://msdn.microsoft.com/en-us/library/system.runtime.remoting.channels.tcp.tcpchannel(v=vs.71).aspx
I am having problem making my .Net Remoting c# client-server program to work
and to connect to each other when there's router in between the client and
the server.
set on the client side
useIpAddress= false
example:
http://msdn.microsoft.com/en-us/library/system.runtime.remoting.channels.tcp.tcpchannel(v=vs.71).aspx