using Microsoft.AspNetCore.SignalR; using System.Text; using UI.Components; using UI.Data; var builder = WebApplication.CreateBuilder(args); // Add services to the container. Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); builder.Services.AddRazorComponents().AddInteractiveServerComponents(); builder.Services.AddBootstrapBlazor(); builder.Services.AddSingleton(); // 增加 Table 数据服务操作类 builder.Services.AddTableDemoDataService(); // 增加 SignalR 服务数据传输大小限制配置 builder.Services.Configure(option => option.MaximumReceiveMessageSize = null); var app = builder.Build(); if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Error"); app.UseResponseCompression(); } app.UseStaticFiles(); app.UseAntiforgery(); app.MapRazorComponents().AddInteractiveServerRenderMode(); app.Run();