I have a web service that we have deployed in our development, UAT, and production environment. When I add the web service to a project, I want to reference the developemnt instance... but when we go into production, I want to reference the production instance... different URLS.
When you add a web reference to a project, it assumes the name of the one you point to... in developemnt, t hat's the dev one. However I'd like to just give it a generic name and assign the actual target/source at runtime (and keep the actual URL in the web.config). Seems easy, I'm just having a hard time implementing it.
Jan Tielens - 14 Jun 2004 08:17 GMT
Actually this is very easy! Just select the web service node from the solutions explorer in VS.NET. Then change the URL Behavior proprety to Dynamic. VS.NET will automatically create the settings in the .config file. The setting will automatically be read if it's available in the .config file.

Signature
Greetz
Jan
________________
Read my weblog: http://weblogs.asp.net/jan
I have a web service that we have deployed in our development, UAT, and production environment. When I add the web service to a project, I want to reference the developemnt instance... but when we go into production, I want to reference the production instance... different URLS.
When you add a web reference to a project, it assumes the name of the one you point to... in developemnt, t hat's the dev one. However I'd like to just give it a generic name and assign the actual target/source at runtime (and keep the actual URL in the web.config). Seems easy, I'm just having a hard time implementing it.