-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Has path handling to a config file changed? #474
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
Comments
This line of code will work when you are running locally or on the server: Configuration = new Configuration().AddJsonFile("config.json").AddEnvironmentVariables(); When running locally config.json will be used, when running on the server AddEnvironmentVariables() will override any config.json values with matching entries from Azure. From where in Azure do these variables come from? You set them in your Web App settings in the azure portal under Settings\Application Settings\App settings and Connection strings. |
This is running in IIS 8 on a WS2012 VM. |
There is an Application Settings area in IIS, but I was wondering if the path itself could be set so that the |
The config filepath was causing the app to fail on the server. If I can't reference a project-based
How should that be done? |
This was working a while back for the path to a config file in
Startup.cs
:I think referencing the path that way stopped working at some point, so I hard-coded a path there. Now that I'm publishing to the server, going back-and-forth between two hard-coded paths isn't going to be cool.
What's the proper way to set that path so that it will work locally and on the server?
The text was updated successfully, but these errors were encountered: