添加查询缓存
有一些效果,原来10分钟就会崩溃的,现在延长了一个小时,不过有的时候,还是会崩溃
This commit is contained in:
@@ -786,6 +786,9 @@ namespace WebSite
|
||||
Exception ex = Server.GetLastError();
|
||||
logger.Error("IIS:" + ex.Message);
|
||||
logger.Error(ex.StackTrace);
|
||||
|
||||
// 清理可能导致循环异常的资源
|
||||
HttpContext.Current.ClearError();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -802,9 +805,9 @@ namespace WebSite
|
||||
var ip = Request.UserHostAddress;
|
||||
var url = Request.Url.AbsolutePath.ToLower();
|
||||
|
||||
// 定期清理恶意IP记录,避免字典无限增长
|
||||
var nowUtc = DateTime.UtcNow;
|
||||
CleanupIpRecordIfNeeded(nowUtc);
|
||||
// 定期清理恶意IP记录,避免字典无限增长
|
||||
var nowUtc = DateTime.UtcNow;
|
||||
CleanupIpRecordIfNeeded(nowUtc);
|
||||
|
||||
// 定义要拦截的路径模式
|
||||
var maliciousPatterns = new[]
|
||||
|
||||
Reference in New Issue
Block a user