權限與靜態檔控制改進:

- 修正 admin 目錄預設頁路由,避免 403.14 與不必要的延遲重導
- 停用未使用的 Sites 多站點初始化,減少應用程式啟動成本
- 修正 Response.Redirect 後未 return 的流程,避免 1.8 分鐘超時
- 將資料庫 Connection Timeout 降為 10 秒,加速失敗回應
- 將 runAllManagedModulesForAllRequests 設為 false,讓 JS/CSS 等靜態檔案直接由 IIS 回應
This commit is contained in:
2025-11-12 20:45:34 +08:00
parent ae09a6f487
commit b04c07a5eb
8 changed files with 46 additions and 262 deletions

View File

@@ -18,6 +18,8 @@ public class RouteConfig
* */
public static void RegisterRoutes(RouteCollection routes)
{
// Web Forms 專案不使用路由忽略
// 靜態檔案效能優化改在 web.config 的 <handlers> 和 <modules> 中設定
//routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
//routes.MapRoute(
// name: "thumb",