initial commit
This commit is contained in:
32
Program.cs
Normal file
32
Program.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
||||
using Library;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services
|
||||
.Configure<KestrelServerOptions>( builder.Configuration.GetSection( "Kestrel" ) )
|
||||
// .Configure<FormOptions>( 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<ExceptionMiddleware>( );
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllerRoute(
|
||||
name: "default",
|
||||
pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||
|
||||
app.Run();
|
||||
Reference in New Issue
Block a user