After deploying my asp.net core app to azure for the first time and ran it, I got the following error:
Error. An error occurred while processing your requ
It is a security measure used in production mode so that any user does not got sensitive exception information from our app.
You can change ASPNETCORE_ENVIRONMENT from "Production" to "Development".
Another option is to change the code for the Configure () method in Startup.cs. It is this method makes a validation:
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
}
...
}
It is not recommended, but you can eliminate this condition:
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UseDeveloperExceptionPage();
...
}