I have two MVC web applications, a www.company.com and a solution.company.com
The website www.company.com include links to solution.company.com/Contact but how can I set
If you want to use DotNet Core or want to switch to it, then it is best to implement it's environment configuration abilities.
Documentation on official site: Working with multiple environments and Configuration in ASP.NET Core
Here is a good example.
var builder = new ConfigurationBuilder()
SetBasePath(hostEnv.ContentRootPath)
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{hostEnv.EnvironmentName}.json", optional: true, reloadOnChange: true);
All you need is to define 3 different appsettings
files. And set ASPNETCORE_ENVIRONMENT
in your system there you want to do your tests or developing.
Or you can use env.IsEnvironment("environmentname")
to check something in runtime.