Its a good to remember that config files can be split across secondary files to make config changes easier on different servers (dev/demo/production etc), without having to recompile code/app etc. For example we use them to allow onsite engineers to make endpoint changes without actually touching the ‘real’ files.
First step is to move the bindings section out of the WPF App.Config into it’s own separate file.
The behaviours section is set to allow both http and https (doesn’t seem to have an affect on the app if both are allowed)
And we move the bindings section out to its own file;
In the bindings.config file we switch the security based on protocol
Now the on site engineers only need to change the Bindings.Config file and the Client.Config where we store the actual URL for each endpoint.
This way we can change the endpoint from http to https and back again to test the app without having to change any code.
Hope this helps.