Program.cs 369 B

123456789101112131415161718192021
  1. var builder = WebApplication.CreateBuilder(args);
  2. // Add services to the container.
  3. builder.Services.AddRazorPages();
  4. var app = builder.Build();
  5. // Configure the HTTP request pipeline.
  6. if (!app.Environment.IsDevelopment())
  7. {
  8. app.UseExceptionHandler("/Error");
  9. }
  10. app.UseStaticFiles();
  11. app.UseRouting();
  12. app.UseAuthorization();
  13. app.MapRazorPages();
  14. app.Run();