Created
May 2, 2020 16:27
-
-
Save CoreProgramm/a921d3695dab90923a2f321e840a06cd to your computer and use it in GitHub Desktop.
Environment Variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. | |
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) | |
{ | |
// If the environment is Development serve Developer Exception Page | |
if (env.IsDevelopment()) | |
{ | |
app.UseDeveloperExceptionPage(); | |
} | |
// else serve User Friendly Error Page with Application Support Contact Info | |
else if (env.IsStaging() || env.IsProduction()) | |
{ | |
app.UseExceptionHandler("/Error"); | |
} | |
if (env.IsProduction()) | |
{ | |
// code to be executed in production environment | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment