It's a setting on the properties of your web service project. Change it from static to dynamic. The web service will insert a key/value pair in your appsettings in the web.config file. You can modify this web.config since it is XML. I set up a testing and production key/value pair and just switch between the two as needed.
Here is a sample of that, but not for a webservice. The idea is the same. I just add the "_development" to the key. When I want to test this in development, I just removed the "_development" and add "_production" to the other one. The app only uses the one that correctly matches. Greg <appSettings> <add key="defaultErrorMessage" value="Sorry, but there is a problem with the page that you requested. Please try again or contact us."/> <add key="testDocsDir_Development" value="D:\webapps\"/> <add key="testDocsDir" value="E:\web_ftp\"/> <add key="allowTestDocs" value="True"/> </appSettings> -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of John Domingo Sent: Wednesday, October 26, 2005 8:28 AM To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM Subject: Re: [ADVANCED-DOTNET] Dynamically setting URL for webservice... It's a good idea to set the URL in the web.config. ----- Original Message ----- From: "Mike Andrews" <[EMAIL PROTECTED]> To: <ADVANCED-DOTNET@DISCUSS.DEVELOP.COM> Sent: Tuesday, October 25, 2005 3:26 PM Subject: [ADVANCED-DOTNET] Dynamically setting URL for webservice... Guys, I've got a webservice that I'm going to consume in a Web application. How can I add a web reference (for testing locally) and then change the reference later for moving to the webserver. The webservice will be located on various remote web servers. Or is that even possible? Thanks, Mike =================================== This list is hosted by DevelopMentorR http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorR http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ =================================== This list is hosted by DevelopMentorR http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com