Akshay Deshmukh
How many settings files (Json) available in ASP.NET Core?
By Akshay Deshmukh in .NET Core on Jul 13 2017
  • Akshay Deshmukh
    Jul, 2017 13

    1. appsettings: used to store application setting key value pairs, connection strings. 2. bower: package manager for the web. used to install right versions of files and dependencies. 3. bundleconfig: used to store configuration for bundling and minification of files. 4. global: used to store solution level settings. 5. project: used to store project level configurations. 6. launchsettings: used to store profile settings to launch the application, profile specific debugging settings.

    • 1
  • Bhagawat Shinde
    Jul, 2023 16

    In ASP.NET Core, there are typically three main settings files (JSON) commonly used for configuration:

    appsettings.json: This is the primary configuration file used in ASP.NET Core applications. It provides a central place to store various configuration settings for your application. It typically includes settings related to the application, such as logging, database connections, third-party integrations, and more. The appsettings.json file is typically located in the project’s root directory.

    appsettings.{Environment}.json: In addition to the appsettings.json file, ASP.NET Core supports environment-specific configuration files. The {Environment} placeholder represents the specific environment, such as “Development,” “Staging,” or “Production.” These environment-specific configuration files allow you to override or add configuration settings based on the environment. For example, you might have an appsettings.Development.json file that includes development-specific settings. ASP.NET Core automatically loads the appropriate environment-specific configuration file based on the current environment.

    secrets.json: The secrets.json file is used to store sensitive information, such as API keys, connection strings, or other secrets that should not be checked into source control. The secrets.json file is typically used in local development environments. It is not intended to be deployed or used in production environments. Secrets stored in this file can be accessed during development using the IConfiguration interface or the dotnet user-secrets CLI command.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS