Program.cs 548 B

1234567891011121314151617181920212223242526
  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. // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
  10. app.UseHsts();
  11. }
  12. app.UseHttpsRedirection();
  13. app.UseStaticFiles();
  14. app.UseRouting();
  15. app.UseAuthorization();
  16. app.MapRazorPages();
  17. app.Run();