views:

41

answers:

1

Hello,

I'm working on two webservices
Call the first one ModelService
and the second one ConfigurationService

My goal is to have multiple servers running the ConfigurationService and one central server running the ModelService

So far what I have working is the ModelService has a ServiceReference added which points to http://localhost:4958/ConfigurationService.svc
And I access it as:

ConfigurationService.ConfigurationServiceClient svc = new ConfigurationService.ConfigurationServiceClient();
ConfigurationService.WrappedConfiguration config = svc.GetConfiguration();

I know there are constructors that use things like string endpointConfigurationName, string remoteAddess which I'm guessing are how I will point to instances of the ConfigurationService on different servers.

What I can't get to work/don't understand, is what do I add as a service reference to ModelService in order for it to be able to create ConfigurationService objects for each of the remote servers.
And how do I configure a ConfigurationService on a server to know what it's endpoint is?

+1  A: 

You can add service reference from any of your servers running ConfigurationService. The important part is that you have to keep list of those servers (URLs) somewhere in ModelService to be able to create client to any of "configuration servers". The mentioned constructor will allow you to do that.

Ladislav Mrnka