Remove UseDeveloperExceptionPage() call (#5)
* Also remove empty newline at start of Program.cs
This commit is contained in:
Родитель
f0fb4ad4e7
Коммит
88d641eb03
|
@ -5,8 +5,8 @@ using Microsoft.AspNetCore.Identity.UI;
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Company.WebApplication1.Data;
|
||||
using Company.WebApplication1.Models;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
|
@ -38,14 +38,15 @@ builder.Services.AddRazorPages();
|
|||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
#if (IndividualLocalAuth)
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
#if (IndividualLocalAuth)
|
||||
app.UseMigrationsEndPoint();
|
||||
#endif
|
||||
}
|
||||
else
|
||||
#else
|
||||
if (!app.Environment.IsDevelopment())
|
||||
#endif
|
||||
{
|
||||
#if (RequiresHttps)
|
||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||
|
|
|
@ -5,8 +5,8 @@ using Microsoft.AspNetCore.Identity.UI;
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Company.WebApplication1.Data;
|
||||
using Company.WebApplication1.Models;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
|
@ -38,14 +38,15 @@ builder.Services.AddRazorPages();
|
|||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
#if (IndividualLocalAuth)
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
#if (IndividualLocalAuth)
|
||||
app.UseMigrationsEndPoint();
|
||||
#endif
|
||||
}
|
||||
else
|
||||
#else
|
||||
if (!app.Environment.IsDevelopment())
|
||||
#endif
|
||||
{
|
||||
#if (RequiresHttps)
|
||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||
|
|
Загрузка…
Ссылка в новой задаче