2017-10-25 5 views
0

.Net 4.5.2를 사용하여 .Net API와 Salesforce를 통합하려고합니다. Windows 2008 R2가 설치된 서버에서 실행중인 API와 인터넷 속성 TLS 1.2를 확인한 결과 this link에서 확인했으며 Probably Ok이 다시 나타납니다. 즉, 내 서버에서 TLS 1.2를 사용하도록 설정해야합니다. 내가 오류 다음 얻을 연결하려고하면 나는이 API와 통합 ASP.net 웹을 사용하기 시작TLS 1.2 오류 SSL/TLS 보안 채널을 만들 수 없습니다.

테스트를 위해
The request was aborted: Could not create SSL/TLS secure channel. 

닷넷 API에서

나는 코드

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; 

아래에 추가 한 동일한 오류가 발생하지만 모든 프로토콜을 허용하도록 위의 코드를 변경하면

ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 
    | SecurityProtocolType.Tls 
    | SecurityProtocolType.Tls11 
    | SecurityProtocolType.Tls12; 

오류가 발생하여 API에 연결할 수 있습니다. 내 서버가 TLS 1.2에서 연결을 설정할 수 없음을 설명합니다. 나는 무엇을 여기에서 놓쳤 느냐?

+0

가능한 중복 : [.NET 4.5의 기본 SecurityProtocol] (https://stackoverflow.com/q/28286086/213550) – VMAtm

답변

1

문제는 서버가 아닌 클라이언트에있는 것처럼 보입니다. 닷넷의 이전 버전

ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; 

:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 

시스템에 설치된 4.5 닷넷 4.0이 사용할 수 있습니다 : 당신은 Microsoft blogs suggest 정확히 당신은 이미했습니다 코드를 사용하는 것을 볼 수있다 TLS 1.2를 사용하기위한 몇 가지 패치가 있습니다.

관련 질문 :

관련 문제