title: How to dynamically change and persist a .NET Web Service URL?
body: <p>We rely on a third party web service, and we have been given three URLs that this web service can be called from by the vendor.  We want to implement some kind of rudimentary failover logic so if one URL doesn't work, we have other URLs to try - the vendor themselves do not do this so it's up to us in our application code.</p>
  
  <p>The "default" URL is stored in the project's config file, and various parts of the application use it.  To be able to implement failover I would need to update the URL that's used (to the first URL in my list that connects successfully) <strong>and</strong> persist that URL for the entirety of the application so all the other parts can make use of it, as opposed to just setting it for a specific request.  In an ideal situation this URL wouldn't change frequently but if one URL is down, it would have to dynamically be changed to use another URL that's verified to work and possibly be changed back at a later time if the new URL is down and the old URL is back up (I hope that makes sense!).</p>
  
  <p>Is there a simple way to do this, or should I just add the checking logic to the method(s) where the web service is being called?</p>