Skip to content

Instantly share code, notes, and snippets.

@wullemsb
Created March 23, 2023 20:10
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllersWithViews();
builder.Services.AddRazorPages();
var app = builder.Build();
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Home/Error");
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment