Last active
May 9, 2021 10:28
-
-
Save manoj-choudhari-git/c560f3b626351e0b04034f5abfed39cf to your computer and use it in GitHub Desktop.
Set environment variables via web.config file in your ASP .NET Core Web App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<location path="." inheritInChildApplications="false"> | |
<system.webServer> | |
<handlers> | |
<add name="aspNetCore" path="*" verb="*" | |
modules="AspNetCoreModuleV2" | |
resourceType="Unspecified" /> | |
</handlers> | |
<aspNetCore processPath="dotnet" arguments=".\DemoApp.dll" | |
stdoutLogEnabled="false" | |
stdoutLogFile=".\logs\stdout" | |
hostingModel="inprocess"> | |
<environmentVariables> | |
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" /> | |
<environmentVariable name="CONFIG_DIR" value="f:\application_config" /> | |
</environmentVariables> | |
</aspNetCore> | |
</system.webServer> | |
</location> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment