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:
An error occurred while processing your request.
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.
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?
Set the DOTNET_ENVIRONMENT and ASPNETCORE_ENVIRONMENT to Production when you deploy it.
- Microsoft Docs > ASP.NET Core > Fundamentals > Environments (dev, stage, prod) > Use multiple environments in ASP.NET Core