-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[ANCM] Add switch to prefer env over web.config #19746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/EnvironmentVariableTests.cs
Show resolved
Hide resolved
@@ -13,6 +13,7 @@ | |||
#define ASPNETCORE_IIS_AUTH_BASIC L"basic;" | |||
#define ASPNETCORE_IIS_AUTH_ANONYMOUS L"anonymous;" | |||
#define ASPNETCORE_IIS_AUTH_NONE L"none" | |||
#define ANCM_PREFER_ENVIRONMENT_VARIABLES_ENV_STR L"ANCM_PREFER_ENVIRONMENT_VARIABLES" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why ANCM
instead of ASPNETCORE_ANCM
like in ASPNETCORE_ANCM_HTTPS_PORT
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This environment variable is only used by ANCM. All other environment variables are eventually used by managed code, while this is exclusively used by ANCM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this name for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use ANCM for other variables. For example ANCM_HTTPS_PORT
.
Seems reasonable to keep this name consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why
ANCM
instead ofASPNETCORE_ANCM
like inASPNETCORE_ANCM_HTTPS_PORT
?
Ah, and the reason for the ASPNETCORE_
prefix in ANCM_HTTPS_PORT
is the fact that it's read out of config. This is directly read as an env var. I could go either way I suppose 🤷♀
Fixes #19450