bitScry

  • Home
  • About
  • Blog
  • Contact

appsettings.json

About this site

This is a blog to help me remember some of the coding challenges I’ve faced and hopefully help others out if they’re suffering the same problems.

Recent Posts
  • Serving Images from Blob Storage in an Azure Function
  • Redis Caching in .NET
  • Passing Environment Variables From Docker to .NET Web App
  • Retrieving Data from MySQL Stored Procedures in .NET
  • Excluding Child Properties from a List of Objects in Fluent Assertions
Tag Cloud

.NET .NET Core AAD API ASP.NET Core Authentication Authorization Azure Azure Active Directory Azure Function Azure Storage Blob Bootstrap C# Cloud Storage Console Application CSS DataTable Dependency Injection Dictionary Entity Framework Enum Extension Google HTML Image IP Address JavaScript jQuery JSON List MVC MVC 6 Newtonsoft RestSharp Serilog SQL Stored Procedure Stream Table Table Storage Test Web App Web Application WordPress

Programming

Publishing Additional Files in Visual Studio Code

When creating a console application I normally mimic ASP.NET core apps and keep my configuration settings in an appsettings.json file. When publishing the application in Visual Studio the appsettings.json file needs to have it’s properties updated to ensure it’s copied to the publish folder like so. Doing this updates the Read more…

By Shinigami, 3 years5 March 2020 ago
Programming

Reading Lists from appsettings.json

I’ve been using the SendGrid API for a project and I was trying to be lazy and read multiple email addresses to send to from a single parameter in appsettings.json with the email addresses separated by a semicolon. Strangely this only sends to the first email in the string so Read more…

By Shinigami, 6 years14 November 2017 ago
Programming

Adding appsettings.json to .NET Core Console App

UPDATE: It appears that there’s now a “Worker Service” template available (thanks Hobby Developer) which scaffolds Dependency Injection, configuration and logging for you. If you wnat a long running service then that’s probably the best option but if you want an intermitantly triggered executable that does a defined task and Read more…

By Shinigami, 6 years30 May 2017 ago
Programming

ASP.NET Core Settings Dependency Injection

There’s a variety of different ways to access configuration settings from an appsettings.json file in a project, these are all well documented here so this post is mostly intended to serve as a reminder for the methods I most frequently use. Dependency injection (DI) is a technique for achieving loose Read more…

By Shinigami, 6 years5 January 2017 ago
  • Facebook
  • Twitter
  • Instagram
  • Email
Hestia | Developed by ThemeIsle