protected void Application_Start(object sender, EventArgs e) { AppCfg cfg = new AppCfg() { Allow_Max_Connect = 10, Allow_Req_Quantity = 10, Allow_ClearIsBadIP_Wait_Minutes = 10 }; AppUtility.Init(cfg); }
/// <summary> /// 初始化配置 /// </summary> /// <param name="cfg">化配置文件</param> public static void Init(AppCfg cfg) { Cfg = cfg; }
internal static IReqCacheDb ReqCacheFactory = null; // 定义一个 static AppUtility() { Cfg = new AppCfg(); // ReqCacheFactory = new DefaultReqCacheDb(); }