WCF IIS? IIS , *.svc.
, - , IIS.
, web.config( - ASP.NET) (applicationName).exe.config, - :
<client>
<endpoint name="YourEndpointName"
address="http://localhost:8085/WebServiceService.svc"
binding="......." bindingConfiguration="............."
contract="..................." />
</client>
- address= <endpoint>.
, :
MyServiceProxy client = new MyServiceProxy("name of endpoint configuration");
.
: , - :
// create custom endpoint address in code - based on input in the textbox
EndpointAddress epa = new EndpointAddress(new Uri(textbox.Text));
// instantiate your cilent proxy using that custom endpoint address
// instead of what is defined in the config file
MyServiceProxy client = new MyServiceProxy("name of endpoint configuration", epa);