Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/spa-templates.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Halter <halter73@gmail.com>2021-07-23 22:34:37 +0300
committerGitHub <noreply@github.com>2021-07-23 22:34:37 +0300
commit88d641eb031bc727b9042531da7a12ebde7fab99 (patch)
treeef335920817ffc16d1a96ac415d7e408054746f4 /src
parentf0fb4ad4e778ca49fb93b5f97ca2bc8c26c4cfa9 (diff)
Remove UseDeveloperExceptionPage() call (#5)
* Also remove empty newline at start of Program.cs
Diffstat (limited to 'src')
-rw-r--r--src/content/Angular-CSharp/Program.cs9
-rw-r--r--src/content/React-CSharp/Program.cs9
2 files changed, 10 insertions, 8 deletions
diff --git a/src/content/Angular-CSharp/Program.cs b/src/content/Angular-CSharp/Program.cs
index e9c70a2..f215704 100644
--- a/src/content/Angular-CSharp/Program.cs
+++ b/src/content/Angular-CSharp/Program.cs
@@ -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.
diff --git a/src/content/React-CSharp/Program.cs b/src/content/React-CSharp/Program.cs
index e9c70a2..f215704 100644
--- a/src/content/React-CSharp/Program.cs
+++ b/src/content/React-CSharp/Program.cs
@@ -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.