[英]Can a .NET WCF application work with more than one network adapter?
We have an existing .NET Framework 4.7.1 application that communicates with a .NET server in a domain through WCF/NetTcp.我们有一个现有的 .NET Framework 4.7.1 应用程序,它通过 WCF/NetTcp 与域中的 .NET 服务器通信。 We now need a third-party external hardware to send data to it.
我们现在需要一个第三方外部硬件来向它发送数据。 However, this hardware will ideally not be in the corporate network, but on its own network, so a second network card (*) would be installed on the PC:
但是,理想情况下,此硬件不在公司网络中,而是在其自己的网络中,因此将在 PC 上安装第二个网卡 (*):
------ Network 1 (AD domain) ------------
| |
| ----------------- |
| | PC Win10 | |
| |.NET application | |
| | WCF | |
Network 2 | |-----------------| |
CLIENT APP* ---------> |ETH2* ETH1| ------> .NET SERVER |
| ----------------- |
| |
------------------------------------------
* = new
Question问题
Can this be done in application level, ex.这可以在应用程序级别完成,例如。 with an additional app/process and named pipes between them, or even better, in a single application (the existing one)?
在单个应用程序(现有应用程序)中,它们之间是否有额外的应用程序/进程和命名管道,甚至更好? Or should it be done at network layer, ex.
还是应该在网络层完成,例如。 bridging or another solution?
桥接或其他解决方案?
NETTcpbinding is only applicable to the internal network environment. NETTcpbinding 只适用于内部网络环境。 If you want to use internal network services from the outside, it is recommended to publish an external network address from the inside so that the outside can access it, or you can add binding to make your service available for external access.
如果你想从外部使用内网服务,建议从内部发布一个外网地址,让外部可以访问,也可以添加绑定,让你的服务可供外部访问。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.