Click here to Skip to main content
15,898,010 members
Articles / Programming Languages / ASM

Dynamically send WCF endpoint in Silverlight

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
15 Aug 2011CPOL 5.5K   3  
If you are using ChannelFactory to access your WCF service here is another solution: http://pocorath.blogspot.com/2011/08/servicereferencesclientconfig.html[^].

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
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.
Please Sign up or sign in to vote.
17 May 2011#realJSOP
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 = "";//...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect BI Software, Inc.
United States United States
A seasoned IT Professional. Programming and data processing artist. Contributor to StackOverflow.

Comments and Discussions