web reference problem

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
L

Lloyd Dupont

I'm developing, on my home computer, a WebService and an application
consuming it.
When I added the WebReference I used a local URL.
How could I change this URL?
More than hard coding it to a new value, I want to put it in a Application
Configuration file.
And update dynamically at runtime.

How could I do that?
is it possible to write something like:

MyWebService mws = new MyWebService();
mws.SetUrl(anUrl);
mws.MyWebMethod();

??
 
You almost got it :-)

mws.Url = anUrl;

I'm developing, on my home computer, a WebService and an application
consuming it.
When I added the WebReference I used a local URL.
How could I change this URL?
More than hard coding it to a new value, I want to put it in a Application
Configuration file.
And update dynamically at runtime.

How could I do that?
is it possible to write something like:

MyWebService mws = new MyWebService();
mws.SetUrl(anUrl);
mws.MyWebMethod();

??
 
Back
Top