Exception håndtering
The snippet can be accessed without any authentication.
Authored by
Peter Ravnholt
Sæt exceptionhåndtering efter miljø.
Startup.cs 358 B
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
// Ok to display sensitive tech details when developing
app.UseDeveloperExceptionPage();
}
else
{
// Use a simple error page without technical details
app.UseExceptionHandler("/error");
}
}
Please register or sign in to comment