-2

I have this WCF Service:

http://localhost:56471/WcfPruebaService.svc

And I need it to be:

http://localhost:56471/ServiciosDePrueba/WcfPruebaService.svc
Andy A.
  • 1,392
  • 5
  • 15
  • 28

1 Answers1

0

You just need to open app.config and replace the old address with the new one.
Or if you want to change it in code (programmatically) you can use the following code:

WSHttpBinding binding = new WSHttpBinding();
EndpointAddress endpoint = new EndpointAddress(new Uri("***"));
MyServiceClient client = new MyServiceClient(binding, endpoint);

https://learn.microsoft.com/en-us/dotnet/framework/wcf/how-to-implement-a-wcf-contract#edit-appconfig
How to programmatically modify WCF app.config endpoint address setting?

Lan Huang
  • 613
  • 2
  • 5