Alternatives
Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
17 May 2011Omar Al Zabir 2 alternatives
Silverlight webservice references get harcoded in ServiceReference.ClientConfig. The URLs get set to your development servers. But when you deploy live, the URLs don't match. Here's a way to dynamically change the URL of the service based on which website the Silverlight app is loaded from.
This is how I do it (we determine the host and select the appropriate endpoint).// these are the endpoints define in the webconfig filestring LocalHostEndpointName = "LocalHost_Endpoint";string ProductionEndpointName = "Production_Endpoint";string CurrentEndpoint = "";//...
A seasoned IT Professional. Programming and data processing artist. Contributor to StackOverflow.