Reputation: 1164
I have hosted AspNetCore app as Azure App service. I have done all the things right but production app still throws developer exceptions.
Code in Configure
function:
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseStatusCodePagesWithRedirects("~/Error?statusCode={0}");
app.UseExceptionHandler("/Error");
}
Azure App Service Configuration: ASPNETCORE_ENVIRONMENT : Production
Upvotes: 1
Views: 269
Reputation: 9490
Try to delete the environment variable from Azure configuration. The default for ASPNETCORE_ENVIRONMENT
variable is production environment.
Upvotes: 1