在Blazor应用程序的Startup.cs文件中,添加以下代码,将应用程序的MaxConcurrentUpgradedConnections属性设置为更高的值(例如10),以改善由于并发连接限制而导致的资源加载问题。
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
services.AddServerSideBlazor();
services.Configure(options =>
{
options.MaxConcurrentUpgradedConnections = 10;
});
}