I have Asp.Net core web api project. I want to add some configurations for development environment during debugging with iis express so, I added new file "appsettings.Development.json" under "appsettings.json" one. When I put the connection string in this file I had exception with connecting the database. If I remove the connection string from this file and put it in "appsettings.json" It works fine (the same connection string).
By default we have two settings files for production and staging but not for development. Is this the correct way to add those configurations during development?. Or should I depend on "appsettings.json" only during development?.
Note: when publish the project and put it under IIS server every thing is fine with "appsettings.Development.json" also.