IIS 7.5 Secure Communication Error - The underlying connection was closed: Could not establish secure channel for SSL/TLS

StackOverflow https://stackoverflow.com/questions/23136790

  •  05-07-2023
  •  | 
  •  

문제

We are experiencing the following error when trying to use an external web service from our application deploy under IIS 7.5.

Error - The underlying connection was closed: Could not establish secure channel for SSL/TLS.

This works from other servers, but on this particular one it fails. This started happening when the server we are trying to connect with disallowed SSL connections and is only accepting TLS. As described in this link http://support.microsoft.com/kb/915599 we changed the registry, but are still seeing the error. Please see the attached image of the registry to make sure this was done properly. It seems like IIS is still trying to use the SSL protocol. I'm a bit confused where in the communication process IIS selects the protocol, SSL vs TLS. Maybe there's something that needs to be done to ensure TLS is selected? Other ideas?

IIS Resgistry

도움이 되었습니까?

해결책

This was fixed at the code level by adding the following line -

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top