Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

SSl Problem on windows mobile with C#

  • 20-03-2013 1:35pm
    #1
    Registered Users, Registered Users 2 Posts: 7,501 ✭✭✭


    Ive developed a C# application which works fine on Win32 and WinCE and im trying to get it to work on Windows mobile 6.1 for use with Mc55 handheld devices.

    As far as im aware the code shouldnt have to be changed as it should work fine on the .net compact framework.

    It posts to a secure webservice.

    When i attempt to post i get the error "Could not establish trust relationship with remote server".

    From googling everyone says this is a problem with the SSL certificate of the webservice but it works fine on Win32 and WinCE 6.0 and i can browse to the webservice's wsdl definition on the device.

    The certificate is a wild card certificate but from what i can read online Windows Mobile 6.1 supports wildcard certificates and its for the correct hostname.

    Im Connecting through a work proxy server if that makes any difference but the other two machines are also working through the same proxy.

    Any suggestions on what it could be?


Comments

  • Registered Users, Registered Users 2 Posts: 7,501 ✭✭✭BrokenArrows


    Found this on stackoverflow which seems to work but its actually forcing the client to accept the certificate.

    http://stackoverflow.com/questions/5713071/problem-ssl-certificate-c-sharp
    System.Net.ServicePointManager.CertificatePolicy = new TrustAllCertificatePolicy();
    
    public class TrustAllCertificatePolicy : System.Net.ICertificatePolicy
    {
      public TrustAllCertificatePolicy() 
      {}
    
      public bool CheckValidationResult(ServicePoint sp, X509Certificate cert,WebRequest req, int problem)
      {
        return true;
      }
    }
    


Advertisement