我正在开发两个 web 服务
调用第一个 ModelService
和第二个 ConfigurationService
我的目标是让多台服务器运行 ConfigurationService 和一台中央服务器运行 ModelService
到目前为止,我所做的是 ModelService 添加了一个指向 http://localhost:4958/ConfigurationService.svc
的 ServiceReference
并且我以以下方式访问它:
ConfigurationService.ConfigurationServiceClient svc = new ConfigurationService.ConfigurationServiceClient();
ConfigurationService.WrappedConfiguration config = svc.GetConfiguration();
我知道有些构造函数使用string endpointConfigurationName, string remoteAddess
我猜想的东西,我将如何指向不同服务器上的 ConfigurationService 实例。
我无法开始工作/不明白的是,我应该添加什么作为对 ModelService 的服务引用,以便它能够为每个远程服务器创建 ConfigurationService 对象。
以及如何在服务器上配置 ConfigurationService 以了解它的端点是什么?