I am trying to find out what the problem is with my application but I always get the following error page:
I tried adding to azure the ASPNETCORE_ENVIRONMENT variable, and then restarted, but it still does not work. Am I missing smth?
I tested at my side, and the app environment was changed to development:
Then, for testing, I just throw a Exception in my code, and I will see the detailed error page:
So, I have some suggestions:
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
//if (env.IsDevelopment())
//{
// app.UseDeveloperExceptionPage();
//}
// Force to use development environment
app.UseDeveloperExceptionPage();
...
}
And then re-publish it to you web app.