======================================================================== Lib.IpCountry.asp 수정본 작성일 : 2026-09-08 대상 : /common/lib/Lib.IpCountry.asp ======================================================================== [변경 내용] 1. 함수 진입 즉시 iP_Ret_CountryCode = "" 로 초기화 -> 어떤 경로로 빠져나가도 Empty 가 아닌 문자열을 반환한다. 이 한 줄이 이번 장애의 재발을 막는 핵심이다. 2. setTimeouts 추가 -> 기존에는 타임아웃이 없어 API 무응답 시 다운로드 요청이 그대로 매달렸다. 3. http:// -> https:// 4. 응답 상태·본문 검증 후에만 JSON 파싱 -> JSON 이 아니면 For Each 를 시도하지 않는다. 5. Dim 으로 변수 명시 선언 (기존에는 query, serviceKey, answer 등이 전역으로 샜다) ======================================================================== [교체 코드] 아래 전체를 기존 iP_Ret_CountryCode 함수와 맞바꾼다 ======================================================================== 'IP로 해당 국가 확인 API Function iP_Ret_CountryCode(sIp) Dim proxip, proxip_arry, xmlhttp, sResponse, oJSON, row, this Dim serviceKey, api_url ' [핵심] 어떤 경우에도 Empty 를 반환하지 않는다. ' Empty 가 AddParam 으로 넘어가면 ADO 가 해당 파라미터를 ' "미공급"으로 처리해 INSERT 전체가 실패한다. ' (2025-12-05 DOWN_LOG 적재 중단의 직접 원인) iP_Ret_CountryCode = "" On Error Resume Next 'AWS 프록시 서버 통신 일경우 체크 : 체인의 첫 번째가 실제 클라이언트 proxip = Request.ServerVariables("HTTP_X_FORWARDED_FOR") & "" If proxip <> "" Then proxip_arry = Split(proxip, ",") sIp = Trim(proxip_arry(0)) End If If Trim(sIp & "") = "" Then Exit Function serviceKey = "rqND5%2BMKZUuww7c4LoBFj2GtHxFUmFxd8DiJd4F%2BJ7UBk08SZSbUFn90iigWB7mi8Dx0pt42yuePqUNTXCAqdQ%3D%3D" ' serviceKey 는 이미 URL 인코딩된 값이므로 다시 인코딩하지 않는다. api_url = "https://apis.data.go.kr/B551505/whois/ip_address" & _ "?serviceKey=" & serviceKey & _ "&query=" & Server.URLEncode(sIp) & _ "&answer=json" Set xmlhttp = Server.CreateObject("Msxml2.ServerXMLHTTP") If Err.Number <> 0 Then Err.Clear : Exit Function ' [추가] 무한 대기 방지 (resolve, connect, send, receive / ms) xmlhttp.setTimeouts 2000, 2000, 3000, 3000 xmlhttp.Open "GET", api_url, False xmlhttp.setRequestHeader "Content-Type", "application/json; charset=UTF-8" xmlhttp.setRequestHeader "Accept", "application/json" xmlhttp.send If Err.Number <> 0 Then Err.Clear Set xmlhttp = Nothing Exit Function End If If xmlhttp.Status <> 200 Then Set xmlhttp = Nothing Exit Function End If sResponse = xmlhttp.responseText Set xmlhttp = Nothing ' JSON 이 아니면(에러 XML 등) 파싱 자체를 시도하지 않는다. If InStr(sResponse, "{") = 0 Then Exit Function Set oJSON = New aspJSON oJSON.loadJSON(sResponse) If Err.Number <> 0 Then Err.Clear Set oJSON = Nothing Exit Function End If For Each row In oJSON.data("response") If row = "whois" Then Set this = oJSON.data("response").item(row) iP_Ret_CountryCode = this.item("countryCode") & "" End If Next If Err.Number <> 0 Then Err.Clear Set oJSON = Nothing On Error Goto 0 END Function Suprema | Security & Biometrics
Latest press releases from Suprema
Suprema will host a partner conference in Tokyo to reinforce market leadership in Japan
September 11, 2019

Seoul, September 10, 2019 – Suprema is set to host Suprema Connect Japan 2019 (SCJP 2019), an exclusive partner conference in Tokyo on September 19th. This year’s conference will be co-hosted with Secure Inc., a Suprema’s strategic partner in Japanese market.

Exclusive to the SCJP 2019, Suprema will make the first official showcase of newly launched Mobile Credential solution. The new Mobile Credential is the industry’s most advanced and newest smartphone-based authentication solution using both Bluetooth Low Energy (BLE) and NFC. The solution features dedicated credential management portal website for card issuing, maintenance and control. The Mobile Credential solution will provide seamless operation over both iPhone and Android smartphones, and easier maintenance with portal service. In addition, Suprema will showcase its latest range of facial recognition products and enterprise access control solutions.

“We are very excited to host a partner conference in Japan. The co-host for the event, Secure Inc., is our strategic partner in Japan and has maintained more than a decade of partnership with Suprema. In cooperation with Secure Inc., we will guarantee our delivery of highest quality products and services to Japanese customers in localized approach which is appreciated by our customers around the world,” said Kenji Oba, Managing Director of Suprema Japan.

Suprema Connect Japan 2019 will be held in Keio Plaza Hotel in Tokyo on September 19, and for more information or to register, please visit https://bit.ly/2kr6f42.