Could not establish secure channel for SSL/TLS

Hello,

simple problem: I can connect to an HTTPS webservice using
.NET Windows Forms, but from my Pocket PC device using the .NET Compact
Framework I get the error from the subject:
"Could not establish secure channel for SSL/TLS".

I suspect it has something to do with authentication to our proxy server... ,
but using the exact same code from my desktop works fine

Here is the code snippet:

// connect to the webservice
private void btnConnect_Click(object sender, System.EventArgs e)
{
   try
   {

      // connect to the webservice -> create webservice object
      _ws = new SDiasPDA();

      // trust all certificates -> always returns true
      ServicePointManager.CertificatePolicy = new                    TrustAllCertificatePolicy();

      // proxy authentication
      WebProxy myProxy = new WebProxy("myproxy", 8080);
      myProxy.Credentials = new NetworkCredential("login", "password",         "mydomain.be");

     _ws.Proxy = myProxy;

   }

   catch (Exception ex)
   {

      MessageBox.Show(ex.Message);
    }
}

private void btnGetConnString_Click(object sender, System.EventArgs e)
{
   try
   {
      // test() is a simple webservice method that returns a message
      // HERE I GET THE EXCEPTION : Could not establish secure channel for SSL/TLS
      MessageBox.Show(_ws.test());
   }
   catch (Exception ex)
   {
      ShowException("button1_Click", ex);
   }
}


Can anybody give me some hint, please
There MUST be a solution for this problem...

Thanks in advance,

nick;




Answer this question

Could not establish secure channel for SSL/TLS

  • _ag

    Hi Nick,

    Can you capture the packet trace of the transfer using Ethereal, NetMon or with NETCF 2.0's logging functionality and send it to me This way we can analyze the trace. Also, the scenario is as follows, is it correct

    Proxy authentication: Digest
    Website authentication: SSL, no further authentication

    What is the proxy used here How about the web server What is the signer of the web server's x509 certificate

    Thanks,
    Anthony

  • elect_son

    Hi Nick,

    Can you try using NETCF 2.0 to see if the application will work fine on it There are many authentication and SSL issues that are fixed on CF 2.0.

    Cheers,
    Anthony

  • Elham_Dahwa

    Hi Nick,

    Are you using NETCF V2 or V1 What is the build number of the NETCF What is the authentication (Basic, Digest, NTLM, Negotiate) you are using

    Thanks,
    Anthony

  • Zou Kok Man

    Hello Anthony,

    thanks for responding to my question.

    I have already tried the exact same application on the .NET CF 2.0 and the same
    error message is showing (on a Windows CE 5.0 emulator)..

    The weird thing about this problem is that a .NET Windows forms application with exact
    the same code does work fine. On my Pocket PC 2003 emulator, I can browse to the ASP Test Page of my webservice (I have to click yes one time in order to accept the certificate).

    More ideas on the cause of this problem are more then welcome!

    Thank you,

    Nick;


  • Jordan A

    Hello,

    I am using .NET CF Vv1.0.5000 SDK.
    Authentication is Digest.

    Thanks for your answer,


    nick

  • Could not establish secure channel for SSL/TLS