瀏覽代碼

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不在白名单里,不允许登录");
                         }
                     }