Development Mode

Pablo Cavadore 1 Reputation point
2021-09-14T14:52:17.913+00:00

Cuando quiero iniciar la aplicación me surge este error The Development environment shouldn't be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users. For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development and restarting the app.
Necesito ayuda para solucionarlo.

Edited:
translated into English
"Cuando quiero iniciar la aplicación me surge este error " == "When I want to start the application I get this error"

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,875 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 22,401 Reputation points Microsoft Employee
    2021-09-15T08:56:06.727+00:00

    @Pablo Cavadore ,

    1.Review the web.config, code, example Program.cs / Startup.cs for the following:
    If you have development server startup for both 'development' and 'production' environments, such as example below:

    if (env.IsDevelopment() || env.IsProduction())
    {
    spa.UseAngularCliServer(npmScript: "start");

    --On Web.config - ASPNETCORE_ENVIRONMENT environment variable with web.config.

    If you do have similar/such config, remove the 'env.IsDevelopment()' and 'env.isProduction()' check - Since deploying an application to the Web App (with ASPNETCORE_ENVIRONMENT not set) would equal to production.

    2.Also, kindly check if ASPNETCORE_ENVIRONMENT to 'development' in AppSettings from Azure Portal, and the remove -restart the WebApp and check.
    Default value (Production), Values (Development, Production)

    132249-image.png

    0 comments No comments