Skip to main content

Posts

Showing posts with the label ASP.NET Core Interview Questions

ASP.NET Core Interview Questions : July 2022

1) What is appsettings.json? This .json file is holding the application configuration values for a.net core application, this is very similar to web.config or app.config in a legacy .net application  We can have multiple versions of the appsettings.json file Template: appsettings.[Environment].json Example:  * appsettings.DevEnv.json * appsettings.TestEnv.json * appsettings.Staging.json * appsettings.json  Little deeper: In order to load the configuration information into the application from the file we need the following class in the .net : JSON Configuration Provider Inherited from FileConfigurationProvider How to use: var _ConfigurationBuilder = new ConfigurationBuilder(Environment.ApplicationBasePath)               .AddJsonFile( "appsettings.Live.json" )                .AddEnvironmentVariables(); Configuration = _ConfigurationBuilder.Build();   2) What is the difference between ASP.NET CORE with .NET Framework and ASP.NET with .NET Core