views:

43

answers:

2

My C# application has three testing stages: alpha, staging and production. Each stage for my application has a sibling web service. The APIs for all three web services are the same.

How could my application use the appropriate sibling web service based solely on alterations to the web.config file?

The goal being to have very little duplicate code, and for the source for my application to be the same across all stages.

+3  A: 

If you use WCF, the endpoint can easily be defined entirely in the config file.

Steven Sudit
A: 

quick case for xml web services: define some appsettings and whenever you new a proxy, use the appsetting as the constructor arg.

but steven has a better suggestion for you, use WCF if you can.

Sky Sanders