Tip 2 : Silverlight-Enabled WCF Service Deployment: Modify ServiceReferences.ClientConfig
When deploying Silverlight application, you will need to unzip the xap file, modify ServiceReferences.ClientConfig, and zip back the xap file. While there are other options such as modifying the ServiceReferences.ClientConfig before the last build or using code to bypass the ServiceReferences.ClientConfig, the unzip/modify/zip approach is the best because it separates the concerns between development and deployment as well as coding and configuration.
For example, given a Demo.xap. To modify ServiceReferences.ClientConfig in the Demo.xap
1. Rename Demo.xap to Demo.zip
2. Right click Demo.zip, on the popup menu, click Extract All…
3. Modify the extracted ServiceReferences.ClientConfig
4. Create a compressed folder named Demo.zip
On the File menu, point to New, and click Compressed (zipped) Folder.
5. Move all the extracted files into the Demo.zip folder
6. Rename to the Demo.zip to Demo.xap
7. Deploy the Demo.xap to the ClientBin folder