If you need a background task within .Net Core to be run at set times we can use the Hosted Service provided from the service within .Net Core.Continue reading Hosted Background timer task
A little hidden gem within .Net Core is the ability to run a Hosted Service inside the application. This allows for your service to run in a different thread to the main application, but keeps everything together though the need to host a separate service.Continue reading Hosting a service inside ASP.NET Core
I came across a very good article on ASP.NET Core which I needed to bookmark, as it gives a clear and understandable guidance on keeping things working as efficiently as possible.Continue reading ASP.NET Core Guidance
Using DotNet Core comes some responsibilities, one of those is making sure your application is up and running.
Since DotNet Core 2.2 the introductions of health checks have been established.
There are two types of Health Checks
- Liveness Health Checks
- Readiness Health Checks
Here is a working example of a simple Docker file for a .NET Core 3.1 project
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env WORKDIR /app COPY project.csproj ./ RUN dotnet restore COPY . ./ RUN dotnet publish -c Release -o out FROM mcr.microsoft.com/dotnet/core/runtime:3.1 WORKDIR /app COPY --from=build-env /app/out . ENTRYPOINT ["dotnet", "project.dll"]