using Microsoft.AspNetCore.Server.Kestrel.Core; using Library; var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services .Configure( builder.Configuration.GetSection( "Kestrel" ) ) // .Configure( x => { x.ValueLengthLimit = int.MaxValue; x.MultipartBodyLengthLimit = int.MaxValue; x.MultipartHeadersLengthLimit = int.MaxValue; } ) .AddControllersWithViews( ) .AddRazorRuntimeCompilation( ); var app = builder.Build(); // Configure the HTTP request pipeline. if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Home/Error"); } app.UseStaticFiles(); app.UseMiddleware( ); app.UseRouting(); app.UseAuthorization(); app.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); app.Run();