locked
Calling Secure Webservices (HTTPS) using compact framework 2.0 RRS feed

All replies

  • User-417784260 posted

    Stupid question but you try to browse to the url of the web service in the devices browser?  Just wondering if maybe the certificate is expired on the web host. 

    Sunday, May 6, 2012 12:35 PM
  • User1399947920 posted

    While accessing the https website in the browser there is always an certificate issue if you don't the certificate installed.

    Same thing is happening in device when I call the service using code it throws the error related to connection "Could not establish secure channel for SSL/TLS".

    For http based web service it is working fine.

    Stupid question but you try to browse to the url of the web service in the devices browser?  Just wondering if maybe the certificate is expired on the web host. 

    Monday, May 7, 2012 1:59 AM
  • User1943143334 posted

    Hi,

    Did you tried installing certificate and check???

    Hope it helps u...

    Monday, May 7, 2012 2:22 AM
  • User1399947920 posted

    Hi,

    Thanks for the reply. I have installed the certificate so on the web broswer on the device I am able to access but from device I am not able to access.

    On microsoft website I also found this code but this does not work at all:

    public class TrustAllCertificatePolicy : System.Net.ICertificatePolicy
    {
     public TrustAllCertificatePolicy()
     {}

     public bool CheckValidationResult(ServicePoint sp,
      X509Certificate cert,WebRequest req, int problem)
     {
      return true;
     }
    }

     

    and use this line before any web-service call to assign policy.

     

    System.Net.ServicePointManager.CertificatePolicy = new TrustAllCertificatePolicy();

     

    Monday, May 7, 2012 2:38 AM
  • User1943143334 posted

    Hi,

    Since your question is related to app development for Windows Mobile device, you can post your question in MSDN forums, so that you may be better answered!

    http://social.msdn.microsoft.com/Forums/en/windowsmobiledev/threads

    Hope it helps u...

    Monday, May 7, 2012 3:04 AM