Is there a way I can programmatically change the <endpoint address="..." />
value of a web service? In my app.config file, I have the following code:
<system.serviceModel>
<bindings>
...
</bindings>
<client>
<endpoint address="http://dev.remotedomain.com/WebServices/WebService.asmx"
binding="basicHttpBinding" bindingConfiguration="InboxServiceSoap"
contract="InboxServiceSoap"
name="InboxServiceSoap" />
</client>
</system.serviceModel>
I want to be able to change
address="http://dev.remotedomain.com/WebServices/WebService.asmx"
to
address="http://mymachine/WebServices/WebService.asmx"
in code. Is this possible progammatically in .NET?