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);

 

 


2016/03/18

커널 덤프

# 프로세스별 스레드/핸들수 확인 (비정상적으로 많은 경우)

# C:\Program Files\Support Tools>poolmon.exe -b   (Windows 2003 Support Tool 필요)
    https://www.microsoft.com/en-us/download/details.aspx?id=15326
# findstr /M /L [Tag] *.sys

# ProcessExplorer - View - System Information - Paged Limit
   C:\Program Files\Debugging Tools for Windows (x86)\dbghelp.dll
   srv*C:\symbols*http://msdl.microsoft.com/download/symbols

# 커널덤프생성
   https://technet.microsoft.com/en-us/sysinternals/bb897415.aspx
   libekd.exe (windbg폴더복사) -> yes 위치 c:\symbols
   kd> .dump /f /o d:\memory.dmp

Debugging Tools for Windows (x86) version 6.12.2.633 
Debugging Tools for Windows (x64) version 6.12.2.633

# Symbol (Microsoft):
srv*C:\symbols*http://msdl.microsoft.com/download/symbols 

!vm  - 메모리 확인, NonPaged Pool Usage / NonPaged Pool Max
!poolused /t 5 2  - 비페이지풀 목록 확인
!poolused 2 -  Sorting by NonPaged Pool Consumed
!process 0 0  - 전페 프로세스 확인 TableSize 큰것
!process 884e6520 4  - 특정 프로세스 thread  확인

# windbg 명령어
http://blogs.msdn.com/b/willy-peter_schaub/archive/2009/11/27/common-windbg-commands-reference.aspx

 

 


가장 많이 본 글