Skip to Content

Solved: How do I fix ASP.net Core Development Mode error occurred while processing your request

Question/Problem Description

In ASP.net Core the following code inserts bookmarks into a Word document using Syncfusion and then exports the Word doc in the browser. When debugging the project, it works as intended; however, upon publishing the project to Azure, it is no longer function correctly.

The error below is shown on the web page:

Error.
An error occurred while processing your request.
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 can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application.

Solved: How do I fix ASP.net Core Development Mode error occurred while processing your request

How can I test the code once published on Azure? What procedures should I follow to test the code once it has been published on Azure?

Solution

Set the DOTNET_ENVIRONMENT and ASPNETCORE_ENVIRONMENT to Production when you deploy it.