c# - How to set programmatically baseAddress for both client and server? -


currently baseaddress fixed in app.config file both service , client

app.config both service , client

<host>       <baseaddresses>         <add baseaddress="http://localhost:8080/service" />       </baseaddresses>     </host> 

is possible programmatically? like

baseaddress = txtbaseaddress.text; 

or any?

you cannot update base address using servicehost readonly. have pass set of baseaddress servicehost constructor or have use configuration file.

please refer following links

  1. msdn

  2. msdn blog


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -