Change EndPoint

  • Thread starter Thread starter Carlos
  • Start date Start date
C

Carlos

I have an console app that call a web service, I need to be able to change
the endpoint so I can consume the webservice form differents server if I
need.

Any Ideas how to do it. ? Ican't find a good example .

Thanks
C
 
I have an console  app that call a web service, I need to be able to change
the endpoint so I can consume the webservice form differents server if I
need.

Any Ideas how to do it. ? Ican't find a good example .

Thanks
C

It looks like you want to change the server at runtime, but otherwise:

Perhaps you could set up an alias for the web server, and the alias
would be referenced in the endpoint in the config file rather than an
explicit server.

If you had the ability to change where the alias was pointing, then
you wouldn't have to change anything in the config file.
 
Carlos said:
I have an console app that call a web service, I need to be able to change
the endpoint so I can consume the webservice form differents server if I
need.

Any Ideas how to do it. ? Ican't find a good example .

You use an app.config with appsettings in it and put the iinformation in the
app.cong. Then you use ConfigurationManager in the program and read in the
appsettings.
 
Back
Top