Experienced Opinion Wanted Regarding Web Services and Url Referenc

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We have a winform application. We are using ClickOnce for deployment.
Currently we can reference the web service through
http://localhost/testws/bob.asmx

When we deploy however we want this reference pointing towards a production
server. Currently we have the URL Behavior set to Dynamic (which keeps it in
sync with the app.config).

Is there a way of switching references dynamically based if in debug mode or
after placed on the server for clients to install. Currently we are messing
with the app.config references each time we go to create install package.

Any help is very much appreciated.

thx
dave
 
You could receive a registration information from the client and store that
in a XML file locally in your application data file path or user's temp
path.. then make your app read this XML file, and assgin the value to the
Webservice URL....

Vijay
 
Thanks but you really didnt answer my question. I am looking on how best to
configure and store data in the config files so that locally (in debug) they
can be different that after published.
 
I am saying quit using the Config files.. and use XML to store information
and read/write to the files..

Vijay
 
The reason I say that is also because, config files are limited with 2003
and really not the best way to store application specific data, they are
more for settings ...like dll reference path, Framework version to use etc..

VJ
 
We have a winform application. We are using ClickOnce for deployment.
Currently we can reference the web service through
http://localhost/testws/bob.asmx

When we deploy however we want this reference pointing towards a production
server. Currently we have the URL Behavior set to Dynamic (which keeps it in
sync with the app.config).

Is there a way of switching references dynamically based if in debug mode or
after placed on the server for clients to install. Currently we are messing
with the app.config references each time we go to create install package.

Don't know if this is really what you're after but don't forget that you
can set the address of the server programmatically instead of using a
config file. You could write some conditional code that would set the
proper address depending on wether the app is compiled in Debug or Release
mode.
 
Back
Top