Remove UseDeveloperExceptionPage() call (#5)

* Also remove empty newline at start of Program.cs
This commit is contained in:
Stephen Halter 2021-07-23 12:34:37 -07:00 коммит произвёл GitHub
Родитель f0fb4ad4e7
Коммит 88d641eb03
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 10 добавлений и 8 удалений

Просмотреть файл

@ -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.