Environment.GetEnvironmentVariable return null in asp.net core.
{ "Logging": { "LogLevel": { "Default": "Warning" } }, "Values": { "EnvironmentName": "Testing" } }
var test= System.Environment.GetEnvironmentVariable("EnvironmentName");
Hi rani,
Refer below links.
https://forums.asp.net/t/2158031.aspx?System+Environment+GetEnvironmentVariable+always+return+null
https://stackoverflow.com/questions/57713484/net-core-environment-variable-returns-null
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.