-3

I have followed a tutorial on how to deploy you .net core application in Azure using Visual Studio IDE .

I have deployed my application successfully but the problem that there is an error that I do not understand .

Here is the error:

An error occurred while processing your request.

Request ID: 0HLM4N476JQOC:00000001
Development Mode

Swapping to Development environment will display more detailed information about the error that occurred.

Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment

I have looked for a solution. One of them is to change some settings on web.config, but I do not have a web.config file in my project.

The other is saying to change the variable in jsonFile ASPNETCORE_ENVIRONMENT from development to production.

It can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development.

I have searched on the internet for a solution.

I have tried this but it doesn't work .

"this would be another question " : how to see my database tables after migrating to azure ?

Any help would be appreciated

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Mark Dibeh
  • 469
  • 7
  • 21
  • Is it a hosted App Service or on a VM? – sellotape Apr 19 '19 at 11:42
  • @sellotape not on vm – Mark Dibeh Apr 19 '19 at 11:47
  • With Core as an app service you generally leave web.config alone. Go into the Azure Portal and change that setting to Development under the Application Settings section (or there is a new Configuration section duplicating it for now). See whether when set to Development it explains more. – sellotape Apr 19 '19 at 11:49

1 Answers1

1

Reason for the below error is:

Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment

Check the value of ASPNETCORE_ENVIRONMENT variable. You will have to set this environment variable to "Production" (or other environment than Development)

for that as @Sellotape mentioned go to go into the Azure Portal and change that setting to Development under the Application Settings section.

You can refer this thread for alternative solution:

Create Environment setting for dot net core web app

To answer your question " how to see my database tables after migrating to azure "

Open Portal.Azure.com and look for your database and see the changes would be the easiest.

Mohit Verma
  • 5,140
  • 2
  • 12
  • 27