How to overcome this:
I have a web service on my local machine (Machine A) and a client of it,
also running on machine A. I generate a client for this webservice using
wsdl.exe. Next, I add the generated file to solution, and can see generated
wrapper classes encapsulating operations on the web service.
And now, I want the very same code to run on another machine (Machine B),
however, the webservice used, will be localized in other place (Machine C).
Is it possible to export somehow location (URL) of the webservice into a
config file,
so as to avoid recompiling the wrappers of the webservice, when deploying on
the
target machine ?
thanks for help
Michał Januszczyk
erymuzuan - 23 Feb 2005 00:24 GMT
if you use VS.Net "add web reference" you can change the service url to
dynamic , this will create a new appsetting entry in your config file.
since you use wsdl.exe, you'll have to manually create this entry in the
config file,
<add key="MyWS.Url" value="http://...../...asmx"/>
now locate in your generated proxy, (in contructor) where it says
this.Url = "http://myoriginal/,....asmx";
change the line to
this.Url = ConfigurationSettings.AppSettings["MyWS.Url"];
regards
erymuzuan mustapa
> How to overcome this:
>
[quoted text clipped - 14 lines]
> thanks for help
> Michał Januszczyk