c# - Specifying multiple SSL protocols to be used in winform application causes exception when calling webservice for TLS1.0 server -


i have winform application built on .net framework 4.5 . want application support multiple ssl protocols, hecnce add following code:

system.net.servicepointmanager.securityprotocol = securityprotocoltype.ssl3 |                                                    securityprotocoltype.tls |                                                   securityprotocoltype.tls11 |                                                   securityprotocoltype.tls12 ; 

but when call webservice hosted on server using tls 1.0 . following exception:

the request aborted: not create ssl/tls secure channel.

i have tried different combination of ssl protocols, worked in 3 scenarios,

  1. i didn't specify protocol.

  2. system.net.servicepointmanager.securityprotocol =securityprotocoltype.tls;

  3. system.net.servicepointmanager.securityprotocol =securityprotocoltype.ssl3 | securityprotocoltype.tls;

so, problem server? or doing wrong? also, if don't specify ssl protocol, able call webservices hosted @ server using tls 1.1 , tls 1.2 ? remember application built on .net framework 4.5 supports tls 1.0 default.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -