Prerequisites
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
- What is your product version? 10.2.0
- What is your product type (Angular or MVC)? MVC
- What is product framework type (.net framework or .net core)? .NetCore
So I am setting up a staging server to do some testing before I publish. Which project launchsettings do I need to change the ASPNETCORE_ENIRONMENT variable in order for the build to select the right appsettings.json file with the correct connection string
4 Answer(s)
-
0
Hi,
You can check ASP.NET Core's documentation about this, see https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments?view=aspnetcore-5.0#set-the-environment
-
0
Hi Ismcagdas, So I understand that microsoft documentation, I have already done this in the Web.MVC project and it doesn't work. My question was should this be done in the Web.Host or Web.Core project as well. I hope this is a better question.
-
0
Hi @jdavis01
You don't have to do anything in Host or Web.Core projects. Could you share what have you done to make the environment staging ?
Thanks,
-
0
This has been resolved.. thanks .
My only issue now seems to be production server needs the environment variable reset after deployment for some reason..