Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I am about to start writing a system that will use WCF to send and receive data from a central server from lots of clients on separate computers and networks. I have had experience in writing applications that use WCF between programs on the same computer but not between programs on different computers. If any, what are the differences between writing services that communicate with separate applications but on the same computer and writing services that communicate with applications that are on separate computers on entirely different networks? Also, would a duplex service be best for this, where the client sends a string containing a code to the server which gets decoded by the server which then sends the relevant data (identified by the code) back to the client? Thank you.
Posted

1 solution

You just need to host the WCF Service on some server and get its URL.
Using that URL, you can add Service Reference to your Project and communicate with it by Service Methods.

As you are asking about difference between WCF on same machine as the client and WCF on different machine, I would say that there is no difference at all. Because WCF Service has a endpoint address on which it operates.

So, wherever you host that Service, that endpoint will differ accordingly. Otherwise there won't be any difference.
 
Share this answer
 
Comments
Henry Hunt 28-Dec-13 9:36am    
Oh, so all I have to do is change the endpoint URLs so that they are not localhosts and make sure all clients use the same URL as the host?
Yes, exactly. :) All the best.

Please accept the answer, if it helped you. :)

Thanks,
Tadit
Henry Hunt 28-Dec-13 11:55am    
That is the bit I can never do with any success! How would I change this endpoint address to make it work on another machine: http://localhost:8000/SystemControllers/Administrator

Do I just have to change 'localhost:8000' to the IP address of the machine that is running the client? I don't understand this part.
When you host the WCF service, you will get a URL address of it. You can use that in web.config of the client.
I would suggest you to read some beginners article about WCF article first. You can get many on Code Project itself. :)

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



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