Reputation: 4359
I am trying to use WCF to setup IPC between 2 running windows applications. I want to start out by saying that I know there are other (better?) ways to implement this solution. But, due to some pre-existing design considerations/constraints, I'm bound to using: - netTcpBinding - DuplexChannelFactory<> to support bidirectional communication
All the applications, services, etc reside on the same machine as we will be installing everything on a single dedicated piece hardware running MS Windows.
So the schematic kind of looks like this WPFApp1 (Contains ReportingFacilityInterface definition) Returns notifications as separate callbacks to WPFApp2 ^ | | V ReportingFacilityInterfaceProxy ^ | | V WPFApp2 (needs to call exposed methods on WPF1 ReportingFacilityInterface object)
I've created my WCF "service" class and contracts. I'm using a proxy dll to facilitate the communication.
Here's the sequence of events:
1)WPFApp1 starts up and instantiates an instance of the exposed service class
ReportingFacilityInterface = new ReportingFacility.ReportingFacilityInterface();
This starts up fine.
2) WPFApp2 startsup and initializes instance of proxy object
reportingFacilityProxy = new ReportingFacilityInterfaceProxy.ReportingFacilityProxy();
This instantiates the proxy object, which results in this getting called:
reportingFacilityInterface = DuplexChannelFactory<IReportingFacilityInterface>.CreateChannel(objContext, "RPIEndPointConfiguration");
This seems to run and return successfuly.
3) WPFApp2 calls a on the object (through the proxy)
reportingFacilityInterface.Initialize(configuration);
I get an exception with the following detail:
Could not connect to net.tcp://localhost:8732/ReportingFacility. The connection attempt lasted for a time span of 00:00:02.1931255. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:8732
I examined my current port usage using the CurrPorts application and noticed that port #8732 does is not in the list of currently active/used ports on my machine.
Since I'm pretty green @ the world of WCF, I'm kind of stumped here. As I mentioned above, all these are running on the same (dedicated) piece of Windows 7 hardware, so permissions/roles should not be an issue. I think I'm pretty close here, but am just missing something.
Thanks, JohnB
Upvotes: 2
Views: 8674
Reputation: 652
I resolved the same issue by going to services and start Net.tcp listener adapter.
Also, you can find more solutions here http://blogs.ajithbhat.com/2010/06/tcp-error-code-10061-no-connection.html
Upvotes: 0
Reputation: 8117
I'd:
Upvotes: 0