Wednesday, February 13, 2013
dev, UAT and production versions of asmx web services
What if you want to set up different versions of the asmx web service your web site uses for the different environments your web site is instantiated in such as development, the user acceptance testing staging grounds, and the live, real thing web site? This seems somewhat painful. There is no way to designate what URL the asmx points to from Web.config as best as I can tell. I do not see a way to have an appSetting in XML in Web.config bubble up to the XML the .disco, .discomap, or .wsdl XML files of an amsx web service. I guess you could include three different asmx web services and swap between them in C# based upon a Web.config setting, but that would also be... ghetto. I think you have to conceptualize the web service as its own app and test it independently. The only hack I have for this problem so far is to change the hosts file of an environment running an app to reroute a URL a web service is to be found at elsewhere and to do the environmental swapping one might otherwise do at Web.config at one's hosts file at the different servers for dev, UAT, and production.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment