I have a question about: how can I use “foreach” the service’s namespaces in client application?
So, I have web.config file in my service.
Here client section:
<client>
<endpoint address="http://nail:81/raj/Service1.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IService1" contract="ServiceReference1.IService1"
name="BasicHttpBinding_IService1" />
<endpoint address="http://www.xxx.ru:81/upd/Service1.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService11"
contract="ServiceReference2.IService1" name="BasicHttpBinding_IService11" />
</client>
In my client app I use it like this:
updater.ServiceReference1.Service1Client myclient = new updater.ServiceReference1.Service1Client();
The problem: In future, I will have more than 50 references in web.config (on my service).
And I don’t want to write 50 code lines like this.
Thank’s a lot!
Really, I dont need in 50 objects for 50 service references. In App.config, in client section I can write :
And from my client code, in circle, I write :
That’s all.
Thanks Matías Fidemraizer for advice!