From a960900364d19bbf0ad7923a57989609e7fce798 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期二, 29 四月 2025 11:15:16 +0800
Subject: [PATCH] 设置当前物料的默认储位

---
 Tiger.Api/Program.cs |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/Tiger.Api/Program.cs b/Tiger.Api/Program.cs
index 19ae675..21de323 100644
--- a/Tiger.Api/Program.cs
+++ b/Tiger.Api/Program.cs
@@ -47,11 +47,13 @@
 	ConsoleExt.Write($"Link Start{(IsRunAsAdmin ? $" As Admin" : "")}", ConsoleColor.Cyan);
 	ConsoleExt.WriteLine($"  < <-<--<---<----< ==== < ===== < ====== ", ConsoleColor.DarkCyan);
 	Logger.Console.Info($"Begin to load {prod}");
-	
-	var options = new WebApplicationOptions
+
+    System.Net.ServicePointManager.DefaultConnectionLimit = 1024;
+
+    var options = new WebApplicationOptions
 	{
 	    Args = args,
-	    ContentRootPath = pathToContentRoot
+	    ContentRootPath = pathToContentRoot,
 	};
 
     var builder = WebApplication.CreateBuilder(options);
@@ -68,6 +70,7 @@
 	    });
 	    //builder.RegisterType<TestService>().As<ITest>();
 	});
+    
     Logger.Console.Info($"AutoFac container inject successful");
     var startup = new Startup(builder.Configuration);
 	startup.ConfigureServices(builder.Services);
@@ -78,8 +81,12 @@
 	
 	builder.WebHost.UseKestrel(opt =>
 	{
-	    opt.Limits.MinRequestBodyDataRate = null;
-	});
+        // 璁剧疆鏈�澶ц繛鎺ユ暟
+        opt.Limits.MaxConcurrentConnections = null;
+        // 璁剧疆璇锋眰闃熷垪鐨勯暱搴�
+        opt.Limits.MaxConcurrentUpgradedConnections = null;
+        opt.Limits.MinRequestBodyDataRate = null;
+    });
 
     if (isService)
 	{

--
Gitblit v1.9.3