I've created an ASP.Net MVC 6 (ASP 5, ASP vNext RC1) web application which I have deployed (published) on a test server (IIS 7.5) using WebDeploy.
When I run the application locally, the IHostingEnvironment
parameter in the startup class is env.EnvironmentName == "Development"
.
After publishing to the server, env.EnvironemntName == "Production"
Question
How can I change the application to run in the Development
(or Test
) environment after I have published it on the server?
In other words, I want the env.EnvironmentName == "Development"
when the application is running on the IIS.
Additional Information
I have three application settings files: appsettings.json
, appsettings.development.json
and appsettings.test.json
.
Each of these have different connection strings.