權限與靜態檔控制改進:
- 修正 admin 目錄預設頁路由,避免 403.14 與不必要的延遲重導 - 停用未使用的 Sites 多站點初始化,減少應用程式啟動成本 - 修正 Response.Redirect 後未 return 的流程,避免 1.8 分鐘超時 - 將資料庫 Connection Timeout 降為 10 秒,加速失敗回應 - 將 runAllManagedModulesForAllRequests 設為 false,讓 JS/CSS 等靜態檔案直接由 IIS 回應
This commit is contained in:
@@ -385,12 +385,14 @@ namespace MyWeb
|
||||
if (!admin.isLoign())
|
||||
{
|
||||
HttpContext.Current.Response.Redirect("~/admin/index.aspx?msg=A1");
|
||||
return; // 立即終止,避免繼續執行後面的資料庫查詢
|
||||
}
|
||||
else
|
||||
{
|
||||
if (admin.info.login_ip != admin.MyIP)
|
||||
{
|
||||
HttpContext.Current.Response.Redirect("~/admin/index.aspx?msg=E");
|
||||
return; // 立即終止
|
||||
}
|
||||
|
||||
foreach (string key in HttpContext.Current.Request.Form)
|
||||
@@ -1023,12 +1025,14 @@ namespace MyWeb
|
||||
if (!admin.isLoign())
|
||||
{
|
||||
HttpContext.Current.Response.Redirect("~/admin/index.aspx?msg=A2");
|
||||
return; // 立即終止
|
||||
}
|
||||
else
|
||||
{
|
||||
if (admin.info.login_ip != admin.MyIP)
|
||||
{
|
||||
HttpContext.Current.Response.Redirect("~/admin/index.aspx?msg=E");
|
||||
return; // 立即終止
|
||||
}
|
||||
this.Page.MasterPageFile = "~/admin/Templates/TBS5ADM001/MasterPage.master";
|
||||
//this.Theme = "Theme1";
|
||||
|
||||
Reference in New Issue
Block a user