Came across an interesting problem yesterday in which I was previously using HTTP for my WCF Mobile Service and a potential client wanted it encrypted. Rather than write a custom encryption, I simply applied a SSL certificate to the IIS application and created a HTTPS binding in IIS.
Afterwards I knew I had to update my Endpoint and Behavior to use HTTPS and allow Meta-Data temporarily so Visual Studio could update my Service Reference. This is where everything went down hill. The Service Configuration file in my WP7 application got wiped and the actual Reference.cs was virtually empty.
After trial and error for several hours I ended doing the following:
- Added a new WCF Reference using a brand new name
- Saved the Project/Solution
- Exited Visual Studio 2010
- Removed the new Reference
- Added the original WCF Reference using the original name
After all that it worked, so hopefully that saves some one hours of headache.