.NET Remoting 客户端在多网卡机器上运行时出现的问题

发布于 2024-07-27 01:44:47 字数 384 浏览 14 评论 0原文

我构建了一个 .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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

天生の放荡 2024-08-03 01:44:47

这对我来说也是一个问题。

这个问题的本质是客户端如何在服务器上注册事件处理程序。 添加事件处理程序时,客户端将发送“绑定”地址的 IP 地址。 这是 TcpChannel 类中的静态非公共字段(谢谢反射器)。 您需要将客户端显式绑定到服务器能够访问的 IP 地址。 客户端的配置文件应该是这样的。

<channel ref="tcp" port="0" bindTo="your.ip.address.here" >

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.

<channel ref="tcp" port="0" bindTo="your.ip.address.here" >
浅笑依然 2024-08-03 01:44:47

我在使 .Net Remoting c# 客户端-服务器程序正常工作时遇到问题
并在客户端和客户端之间有路由器时相互连接
服务器。

在客户端设置

useIpAddress= false

示例:

  <system.runtime.remoting>
    <application name="Client">
      <channels>
        <channel ref="tcp" port="0" useIpAddress="false">
          <clientProviders>

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:

  <system.runtime.remoting>
    <application name="Client">
      <channels>
        <channel ref="tcp" port="0" useIpAddress="false">
          <clientProviders>

http://msdn.microsoft.com/en-us/library/system.runtime.remoting.channels.tcp.tcpchannel(v=vs.71).aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文