Monday, March 14, 2011

Changing WCF service reference in silverlight at runtime

Since Silverlight App is packaged as XAP file, you may be wondering how to change the service reference after building the package. It is pretty simple. XAP file is nothing but a ZIP archive file.
So,
  • Unzip the file using any ZIP archiving software
  • Locate the ServiceReferences.ClientConfig
  • Change the end point in the file, save changes
  • Zip it again and change the extension to XAP

Voila!!!

No comments:

Post a Comment