I have created a desktop application in WPF that I wish to supply to clients as a .exe file.
Currently the application has a web service referenced to it where the web service would be sitting on the clients web server.
There is a high possibility that the URL of the web service could change depending on the clients therefore is it possible to add an option for the user to add the service reference themselves once they know the web service URL?
In the app.config is where the endpoint address is set, so if when the application fired up, it presented the user with a text box to enter the url, then on button click the application updates the service reference. Is this possible?
I have come across lots of different articles however was not sure if it was possible without have to recompile the code?
Assuming it’s a WCF service, if it’s called
Service1you can set its address like this:an ASMX service (still called
Service1in this example for consistency) can be setup like this: