Explorar o código

IP限制提示不显示当前IP

shuiping150 hai 3 días
pai
achega
76f5f650cd
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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不在白名单里,不允许登录");
                         }
                     }