Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
.net core 2.2 appends the environment variable value from web.config file and from user's system #6140
From @jsowndarrajan on Wednesday, 26 December 2018 07:17:54
Environment variable in
Recently, I'm facing a strange issue while hosting .net core 2.2 application on IIS.
After hosting, I get "An error occurred while starting the application". In order to identify the root cause I enabled the log file and found that its because of environment variable issue.
I configured the environment variable in my
But when I try to host this application in IIS, I get ASPNETCORE_ENVIRONMENT variable value as
From my perceptive,
Please let me know if you need any other information from my end.
Copied from original issue: dotnet/core#2184
referenced this issue
Dec 27, 2018
Hi Ellison, Thanks for the response. From my perspective we have to check
But right now we are reading the value from both places and more importantly we are concatenate those value. I think it's strange behavior.
I don't know the actual intention behind appending the env values?!
If it's working as per the design, is there any plan to change it in the future releases?
@guardrex Can we have this behavior added to the docs? I believe this would be the appropriate section- https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-2.2#setting-environment-variables
I have the same issue. When I changed the environment variable value from "Development" to "Staging" or "Product", The error happened and showed "HTTP Error 500.30 - ANCM In-Process Start Failure".