2016/06/17

System.Security.Authentication.AuthenticationException: SSPI 예외

처리되지 않은 예외: System.Security.Authentication.AuthenticationException: SSPI를 호출하지 못했습니다. 내부 예외를 참조하십시오. ---> System.ComponentModel.Win32Exception: 예기치 않은 메시지를 받았거나 메시지의 형식이 잘못되었습니다
  --- 내부 예외 스택 추적의 끝 ---
  위치: System.Net.Security.SslState.CheckThrow(Boolean authSucessCheck)
  위치: System.Net.Security.SslState.get_SecureStream()
  위치: System.Net.Security.SslStream.Write(Byte[] buffer)

 

=> 원인은, 서버쪽에 설정된 SSL 관련 암호화 모듈중에, "SSL" 버젼 또는 "Tls" 버젼 일부를 비활성화(또는 제거) 설정되어 있기 때문에 서버쪽에서 허용 가능한 "SslProtocols" 버젼을 설정해서 AuthenticateAsClient 인증을 받아야 함.

보안에 취약한 "SSL" 및 "Tls" 버젼을 제거하는 것이 권장되고 있으며, 설정이 적용된 지원하지 않는 서버들이 증가하고 있다.

참고 :
How to disable PCT 1.0, SSL 2.0, SSL 3.0, or TLS 1.0 in Internet Information Services
https://support.microsoft.com/en-us/kb/187498

 

 => 그러면,.  고정된 서버에 접근하지 않고 익명의 다중 원격 서버에 접근하는 경우, 지원 버젼을 매번 알아낼수가 없다. 그래서 아래와 같은 or 형태로 지정을 해준다.

 

sslStream.AuthenticateAsClient(_host, certcoll,  SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12, false);

 

 


가장 많이 본 글