.NET Remoting 如何处理 Remoting 服务器端的 IP 地址更改
前提条件 - 远程服务器和客户端都已设置,客户端能够通过客户端激活的业务对象调用方法并从服务器端接收事件。
更改远程服务器的IP地址,同时保持服务器和客户端运行,客户端仍然能够执行上述任务。
这很棘手。
编辑: 设置通道时,bindTo 被删除
Precondition - the remoting server and client are both setup, the client is able to invoke methods and receive events in/from the server side by client-activated business object.
Change the ip address of remoting server with keeping the server and client running, the client is still able to do the above tasks.
This is tricky.
EDIT:
bindTo was removed when setting the channels
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
来吧,现在是 2010 年了...让它成为一个 WCF 应用程序吧。
要回答您的“性能”问题,请查看线程 WCF 与 .NET 远程处理的性能
WCF 与其他以前的通信技术之间的全面比较这里
通过使用 WCF,您可以避免一些令人头痛和听力下降的情况。这是一个安全的赌注,让我向你保证,你不会后悔的。
引用 Saurabh Gupta(MS 的 WCF PM):
C'mon, it's 2010... make it a WCF app already.
And to answer your "performance" concern check out the thread Performance WCF vs .NET remoting
Full comparison between WCF and other previous communication technologies HERE
You are going to save yourself from some headaches and hear-pulling scenarios by going WCF. It's a safe bet and let me assure you, you'll not regret it.
Quoting Saurabh Gupta (WCF PM at MS):
.NET Remoting 比 WCF 更快的唯一场景是在同一进程中的应用程序域之间远程处理数据以及序列化 ADO.NET DataSet 对象时。
除此之外,WCF 几乎总是更快:Windows Communication Foundation (WCF) 的性能比较)与现有的分布式通信技术:
此外,当托管在 IIS 中时,WCF 服务会自动映射到网络连接的新 IP 地址。对于 .NET Remoting 则不然。
虽然某些现有应用程序继续使用 .NET Remoting,但它已被弃用,您应该意识到您编写和部署的任何 .NET 代码在某些时候都需要替换。最好现在就移植到 WCF,而不是等到最后期限到来时再移植。
The only scenarios where .NET Remoting is faster than WCF are when remoting data between appdomains in the same process and when serializing ADO.NET DataSet objects.
Other than that, WCF is almost always faster: A Performance Comparison of Windows Communication Foundation (WCF) with Existing Distributed Communication Technologies:
Further, when hosted within IIS, WCF services are automatically mapped to a network connection's new IP address. The same cannot be said for .NET Remoting.
While some existing apps continue to use .NET Remoting, it is deprecated and you should realize that any .NET code you write and deploy will at some point need to be replaced. Better to do the port to WCF now rather than later when you're up against a brick-wall-deadline.