I have a tomcat webservice and a c# .net client that connects to the service. I created the Connection classes with wsdl.exe and everything is fine. But now i have activated ssl in tomcat to use https. In my c# app i only changed the url to https and i get the following error:
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
How do i avoid this message? is this because the cretificate is untrusted? How do i tell my client that this connection is trusted?
Yes, most likely the server’s certificate isn’t trusted for your client.
You can handle the
ServicePointManager.ServerCertificateValidationCallbackto allow SSL connections to the invalid certificated servers: