소스 검색

IP限制提示不显示当前IP

shuiping150 3 일 전
부모
커밋
76f5f650cd
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      JLHHJSvr/Excutor/LoginExcutor.cs

+ 3 - 1
JLHHJSvr/Excutor/LoginExcutor.cs

@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Data;
 using System.Data.SqlClient;
+using System.Diagnostics;
 using System.Linq;
 using System.Text;
 using JLHHJSvr.BLL;
@@ -70,7 +71,8 @@ namespace JLHHJSvr.Excutor
                         var ipSet = new HashSet<string>(stUser.whiteIPs.Split(',', ','), StringComparer.OrdinalIgnoreCase);
                         if (!ipSet.Contains(remoteIP))
                         {
-                            throw new LJCommonException($"{request.usercode}当前使用的IP[{remoteIP}]不在白名单里,不允许登录");
+                            Trace.Write($"{request.usercode}当前使用的IP[{remoteIP}]不在白名单里,不允许登录");
+                            throw new LJCommonException($"{request.usercode}当前使用的IP不在白名单里,不允许登录");
                         }
                     }