Change EndPoint

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
 
C

cowznofsky

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.
 
M

Mr. Arnold

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top