Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want to communicate between 2 wcf applications on different machine in a local network. The following code don't work and i am clueless why:
{no app config}
ServiceHost:
----------------
ServiceHost host = new ServiceHost(typeof(MyFRWcfService));
string myIP = "192.168.1.2";
NetTcpBinding binding = new NetTcpBinding();
binding.MaxBufferPoolSize = (int)67108864;
binding.MaxBufferSize = (int)67108864;
binding.MaxReceivedMessageSize = (int)67108864;
binding.MaxConnections = 50;
binding.ReceiveTimeout = TimeSpan.MaxValue; 
host.AddServiceEndpoint(
    typeof(IFRWcfContract),
    binding,
    "net.tcp://" + myIP + ":8080/MyFRWcfService");

----------------
Client:
string serverIP = "192.168.1.2";
NetTcpBinding binding = new NetTcpBinding();
DuplexChannelFactory<ifrwcfcontract> scf;
scf = new DuplexChannelFactory<ifrwcfcontract>(
    this,binding,new EndpointAddress(
         "net.tcp://" + serverIP + ":8080/MyFRWcfService"));
IFRWcfContract activator = scf.CreateChannel();
activator.Hello();</ifrwcfcontract></ifrwcfcontract>

----------------
My error is "TCP error 10060" - The client computer get no answer on the last command, when trying to activate a function from the contract.

What am I doing wrong?

Please help, i tried numerous solutions, none work.
Posted

1 solution

Try these:
1- Have you opened the host? If not this is the problem!
2- Comment out codes related to extra settings(like MaxBufferPoolSize,..) & just use the defaults
3- Try using a proxy on client side (use SvcUtil to create a proxy file)
good luck :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900