user990951
user990951

Reputation: 1479

c# programmatically add service reference

I created a visual studio 2012 C# class library, that uses a several service references. I have a development endpoint and test endpoint(i.e dev.addtwonumbers?WSDL and test.addtwonumber?WSDL). I was wondering if there was a easy way in VS2012 to change the endpoints, without going to each of the service reference.

Upvotes: 0

Views: 831

Answers (1)

Tim S.
Tim S.

Reputation: 56536

The endpoint actually used at run time is controlled in your config file (usually App.config or Web.config, depending on what sort of project you're in). You can use Web.config transformations or an equivalent for other config files (e.g. SlowCheetah or a more manual approach) to swap between your different endpoint configurations easily.

Upvotes: 2

Related Questions