I've developed a ASP .net core (3.1) application which is successfully running locally, Now I'm trying to publish the web app through Visual Studio 2019, but getting error as:
An error occurred while processing your request.
Development Mode
Swapping to the Development environment displays detailed information about the error that occurred.
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.
I've already tried adding value to "ASPNETCORE_ENVIRONMENT": "Production"
I'm using connection string as below:Data Source=MyDataSource;Initial Catalog=MyDatabase;Integrated Security=True