Config.json is a JSON file that stores the main settings and configuration for ASP.NET 5 applications
Questions tagged [config.json]
34 questions
111
votes
4 answers
Why does Visual Studio tell me that the AddJsonFile() method is not defined?
I'm developing an ASP.NET 5 WebAPI project using VS Ultimate 2015 Preview. I'm trying to configure the app in this way (line numbers are just guides):
1 using Microsoft.Framework.ConfigurationModel;
2
3 public IConfiguration Configuration { get;…

NetCito
- 1,253
- 2
- 9
- 6
27
votes
3 answers
How to properly read nested configuration values from config.json in ASP.NET5?
I was following some examples for ASP.NET 5 and I got stumbled with how to properly read "nested" configuration values (if that is the proper term).
Here is relevant portion of config.json:
{
"ApplicationName" : "OwNextApp",
"AppSettings":…

CrnaStena
- 3,017
- 5
- 30
- 48
5
votes
6 answers
Retrieve sections from config.json in ASP.NET 5
Let's say I have a config.json like this:
{
"CustomSection": {
"A": 1,
"B": 2
}
}
I know I can use an IConfiguration object to get specific settings, i.e., configuration.Get("CustomSection:A"), but can I grab the whole hierarchy (in any…

Joshua Barron
- 1,532
- 2
- 26
- 42
5
votes
1 answer
ASP.NET 5 + MVC 6 + Web API controller with PUT or PATCH verbs returns 404 error
I have a basic Web API controller built in MVC 6 (beta 3) as part of a new ASP.NET project. The problem I’ve come across is that it doesn’t accept the verbs PUT or PATCH and returns an error 404 whenever I try to access a URL with those…

Dylan Parry
- 3,373
- 6
- 26
- 38
4
votes
1 answer
how to add config file in Class Library, followed by connection string for .NET Core 1.1
I am working on n-tier application, where I have Data Access Layer. which is independent to any other application. I have create Class Library for .NET Core 1.1, I can see dependencies folder but not any config/JSON file. I want to know, Can I add…

K.Z
- 5,201
- 25
- 104
- 240
2
votes
0 answers
PM2 cluster mode nodeJS
PM2: v.4.4.0
NodeJS: v.10.16.0.
config.json:
{
"name": "app-name",
"script": "server",
"exec_mode": "fork",
"instances": 0,
"wait_ready": true
"listen_timeout": 10000,
"kill_timeout": 5000,

Hamber
- 21
- 2
2
votes
2 answers
NodeJS config.json vs process.env for configuartion management
I've come across people using both methods to do config management.
What are the pros and cons of each approach?
If I have a lot of variables that I store in my config object, will I have to set them all one by one in an upstart script before…

Ayush
- 709
- 2
- 8
- 17
2
votes
1 answer
Is there a built in way to serialize array configuration values?
I'm on a new ASP.NET 5 project.
I'm trying to read an array value, stored in my config.json file, that looks like this:
{
"AppSettings": {
"SiteTitle": "MyProject",
"Tenants": {
"ReservedSubdomains": ["www", "info", "admin"]
}
…

Shimmy Weitzhandler
- 101,809
- 122
- 424
- 632
2
votes
3 answers
Configuring properties from config.json using services.Configure
Following on from a StackOverflow question regarding Using IConfiguration globally in mvc6. A comment to the accepted answer suggests using
services.Configure(Configuration);
Now this works fine with the following code;
Class
public…

Tim B James
- 20,084
- 4
- 73
- 103
1
vote
1 answer
How to add a value with a dynamic property into config.json File
When there is a value like this in the config.json file,
{
"timeout": 10000
}
read the value as below in the implemented method in my .ts file
duration : this.config.getConfig('timeout')
My config.Service class is…

rissa
- 57
- 1
- 7
1
vote
1 answer
Podman: Changes made to podman config.json do not persist on container start
I am trying to add a network to a podman container after it has already been created.
These are the steps I took:
Create and start a container:
podman run -it --name "container" --network=mgmtnet img_v1 /bin/bash
The container starts.
I now stop…

Swati Gupta
- 11
- 1
- 2
1
vote
2 answers
Why keras always says using theano backend?
I installed keras using conda in my virtual environment and checked $HOME/.keras/config.json file.
{
"image_data_format": "channels_last",
"epsilon": 1e-07,
"floatx": "float32",
"backend": "tensorflow"
}
I already set backend to…

Samuel Mideksa
- 423
- 8
- 19
1
vote
1 answer
Changing values from config file after building the reactApp
Is it possible to give parameters using .config file to reactApp after running npm run build I am fetching data thorugh a url in reactApp. I need to deploy only the built file.
After giving npm run build, can't I change the values through config…

Vithursa Mahendrarajah
- 1,194
- 2
- 15
- 28
1
vote
2 answers
cannot install docker on windows 10
I am pretty new to docker with windows. I had not problem with it on my personal mac. However, I have been unable to get docker to run correctly on windows 10.
I have followed along the accepted stack overflow answer Cannot start docker after…

Winnemucca
- 3,309
- 11
- 37
- 66
1
vote
0 answers
Configuration retrieving multiple config values Visual Studio 2015 C#6
Trying to learn Visual Studio 2015 MVC and looking for some advice on how to retrieve multiple config values from config.json.
Currently I have the following:
public IEnumerable WeatherAppSetting()
{
var con…

George Phillipson
- 830
- 11
- 39