I am pretty new to Windows Phone development. I was trying to access a service which is on SSL. I spent good amount of time to access the service from my Windows Emulator. There is not much information on the net on this. Finally I could find the solution for this. I assume that you have self signed certificate available in your systems.
Note: If the server is local system, then normally we use https://localhost/... In this case localhost does not work. Use machine full name instead of localhost. For example https://MyMachineName/service1.svc.
Note: For some reason I had to install the certificate twice to work on my system. It it happens to your system, you can do that same. Self Signed certificate name must be host name.
- Export Certificate
- On the server, open Internet Explorer, and click Tools --> Internet Options.
- In the window that comes up, click the Content tab, and then click the Certificates button.
- In the dialog that comes up, select the Trusted Root Certification Authorities tab. The self-signed certificate that you created should be visible. Select your Self Signed Certificate
- Click on the “Export…” button, then click the Next button. On the next screen, select “No, do not export the private key” (the default option) and click Next.
- On the next screen, choose the DER Encoded binary X.509 format (default option) and click Next.
- Finally, select the folder and enter your certificate name.
- Install certificate in Windows Phone Emulator
- Send created certificate to yourself in email. Could be your gmail or hotmail account.
- Open Windows Phone Emulator.
- Navigate to IE.
- Open the email which you sent to yourself.
- Click on the certificate name in the email.
- Then the emulator will allow you to install the certificate.
Note: If the server is local system, then normally we use https://localhost/... In this case localhost does not work. Use machine full name instead of localhost. For example https://MyMachineName/service1.svc.
Note: For some reason I had to install the certificate twice to work on my system. It it happens to your system, you can do that same. Self Signed certificate name must be host name.
No comments:
Post a Comment