My asp.net 5 application is throwing a blank html page at me, if an exception occurs. My goal is to display the default error page.
This question and this question seem to be related, but it is seems to be outdated, since we don't have a web.config any longer and the second one doesnt solve my problem.
This is my Configure()
method in the startup.cs:
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHostingEnvironment env)
{
loggerFactory.AddDebug(LogLevel.Warning);
app.UseStaticFiles();
app.UseMvc(config =>
{
//[...]
});
if (env.IsDevelopment())
{
app.UseBrowserLink();
loggerFactory.AddDebug(LogLevel.Information);
app.UseDeveloperExceptionPage();
}
else
{
loggerFactory.AddDebug(LogLevel.Debug);
app.UseDeveloperExceptionPage();
}
//[...]
}
I have confirmed, that the code is actually hitting the if condition and the UserDeveloperExceptionPage method is loaded, but to no avail.
What am I missing?