简体   繁体   中英

C# WCF NetPipe firewall rules

I'm running service host with net pipe on one PC and I need to connect to this host from another PC in the network. Since net pipe doesn't have any port, I cannot find out what firewall exceptions must be implemented in on the PCs / network in order for these two PC successfully communicate. The service host is created following way

            _host = new ServiceHost(_driverHandler,
       new Uri(DriversConfiguration.NetPipeUri));

        _host.AddServiceEndpoint(typeof(ISystemControl),
                                new NetNamedPipeBinding(),
                                DriversConfiguration.HostEndpoint);
        _host.Open();

Where NetPipeUri is "net.pipe://localhost" and HostEndpoint is "MyFancyApplication". Any idea what firewall exceptions and network configuration (rules on routers) should I use in order to have it working?

The firewall is not the problem: netNamedPipeBinding binding provides cross-process communication on the same machine. Named pipes DO NOT WORK across machines. https://docs.microsoft.com/fr-fr/dotnet/framework/wcf/samples/netnamedpipebinding

You have to add a NetTCPBinding to your service for remote clients

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM