0

I am beginner to WCF services and Windows services. I've a couple of questions regarding WCF services hosted as Windows services yet I've read some on the articles from MSDN:

1) I have a WCF service hosted in Windows service running on one machine on LAN. I want to make silverlight applications running on other machines over same LAN consume that service. I need this architecture to be implemented across many LAN networks i.e. each LAN will have one machine on which Windows service is running and other machines on the same LAN should be able to access the service. Is it a feasible architecture? What technical issues may come up (e.g. firewall setting may restrict client from accessing service)? Shall I have to make different configurations in client applications for each LAN? As a side note, I want to mention that I want to run the service only when there is no internet connection.

2) What are the ways to make a client on LAN consume WCF service hosted in Windows service other than adding a service reference to project?

Tejas Sutar
  • 747
  • 2
  • 11
  • 33

1 Answers1

1

1) - Use Net.Tcp bindings for endpoints. Firewall won't be an issue if client and server are on same network. - Client configuration will be different. You need to point to diffrent endpoint for accessing WCF service.One for each service hosted. 2) You can create proxy class also on client side using SvcUtil utility.

Prinshul Jain
  • 116
  • 1
  • 6
  • Thanks for your answer @user3346013. Still I've one question: You've said in point 1) "You need to point to diffrent endpoint for accessing WCF service.One for each service hosted." Does that mean I've to make settings in app.config? Can I to do it programatically without changing app.config file for each hosted service? – Tejas Sutar Jun 27 '14 at 07:27
  • Yeah you can do this programatically also. Hope below link will help. [link](http://stackoverflow.com/questions/2943148/how-to-programmatically-connect-a-client-to-a-wcf-service ) – Prinshul Jain Jun 27 '14 at 07:30
  • Could you please tell me how to do that programatically? If you have any resource, please provide me. What I basically want is I should be able to declare end points at runtime e.g. user will input end points. – Tejas Sutar Jun 27 '14 at 07:34