List of Posts written during Jan 2022

This is a list of of posts written during the month Jan 2022
(Rev. 28-Jun-2024)

Categories | About |     |  

List of Posts

This is the complete list of categories of posts written during Jan 2022. They have been ordered by the publish date, with the most recent first.

  1. Published: 02-Jan-2022
    This tutorial explains about the various environments like Development, Staging and Production. We also explain how to set them by various methods and how to conditionally check for environments and perform settings.


  2. Published: 05-Jan-2022
    An ASP.NET Core application cannot directly accept requests from the internet. For this it needs a server that can face the internet and help it communicate with the calling client on the other side. This means that some sort of coupling is required with a server software. This tutorial discusses various possibilities. Discussion of the launchSettings file is reserved for the next tutorial.


  3. Published: 07-Jan-2022
    We learn about the finer details of launchSettings.json file. This file contains various launch profiles to start an application in various modes - such as InProcess, OutOfProcess and direct Kestrel. Visual Studio uses this file to populate a dropdown toolbar so that the application can be started in various modes at the click of a button. This allows for easier debugging and testing of an application.


  4. Published: 10-Jan-2022
    Logging helps in troubleshooting, it helps in audit, it helps in getting signals of an imminent application crash. This topic explains the terminology of a log message, and also explains how to configure an application for logging, and also how to observe a sequence of log messages.


  5. Published: 12-Jan-2022
    We shall create an app using visual studio 2022, running .NET 6. The application will artificially throw an un-handled exception. Then we shall verify that if the application is running under development, then asp.net core automatically provides a safety net to handle this exception, and provides a detailed information about the error. But if the same application is in, say, production, then there is no developer exception page, and the application crashes midway, with no response sent.


  6. Published: 20-Jan-2022
    This tutorial continues our previous tutorial where we learnt that if an application is running under development environment, then ASP.NET Core provides a UseDeveloperExceptionPage middleware that catches un-handled exceptions and provides a detailed information about the snapshot state of the application. But that feature is not recommended for production environment - a developer should provide a custom page to filter out the information that finally reaches the display. Let's learn how!


  7. Published: 20-Jan-2022
    We have seen in the previous tutorials that appSettings json file can be used to configure log levels. But this is not the only use of this file - it can, as well, be used to store custom key value data that can be read anywhere in your application. It turns out that log levels are just one of the possible values - there is a lot more that can be done. In this tutorial we shall learn how to store some rudimentary data and then read it back on a razor page.


  8. Published: 21-Jan-2022
    In the previous tutorial we read various properties of an appSettings configuration file. But there is a better method for reading complex properties - such as "Address" - that we read in the previous tutorial. This is done through the options pattern. Let us now read City and ISDCode of the Address property by using the options pattern.


  9. Published: 24-Jan-2022
    We shall create an identity based project from scratch. Although, visual studio provides a scaffolding for all the various modules, but personally I find all that very difficult to integrate with my own projects and my own css files. That's the motivation for starting from scratch. It will be a series of tutorials. In this first tutorial, I shall add nuget packages, followed by an IdentityDbContext, and finally run a migration to create the database on local sql server.