bitScry - Blog

Programming

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
  • Adding a Sonoff Zigbee Dongle Plus P Router to Zigbee2MQTT
  • Configuring Raspberry Pi 5 with NVME Hat
  • Pass Through an iGPU to Frigate from Proxmox
  • Creating a Frigate VM on Proxmox
  • Enable Remote Root SSH Login
Tag Cloud

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

Copyright
Creative Commons License Any code within by is licensed under a Creative Commons Attribution 4.0 International License.
Programming

Passing Environment Variables From Docker to .NET Web App

We have a build pipeline running in GitHub Actions that builds a .NET 6 web in a Docker container and then publishes it to AWS. Within this pipeline we have a manual step where we can chose the source branch or tag and the environment it should be deployed to Read more…

By Shinigami, 2 years ago
Programming

Retrieving Data from MySQL Stored Procedures in .NET

We’re currently working on a .NET backend API project that retrieves data from a MySQL database and returns it to a frontend React app. As this is a migration project we’re working with a pre-existing MySQL database which given it’s currently supporting a live application we’re loath to make structural Read more…

By Shinigami, 3 years ago
Programming

Excluding Child Properties from a List of Objects in Fluent Assertions

We’re currently using Fluent Assertions to help make writing tests for our project a bit easier. This is a very handy library and certainly helps to make test conditions easier to specify and more readable. One issue we did have though was how to exclude specific child properties from a Read more…

By Shinigami, 3 years ago
Programming

Creating a Code Coverage Report for Multiple Projects

The current solution I’m working on is composed of 11 seperate projects, 3 of which are test projects. As part of our CI/CD deployment pipeline we want to be able to generate a code coverage report for these projects which is displayed as a comment on the PR in GitHub. Read more…

By Shinigami, 3 years ago
Programming

Mocking IHttpContextAcessor

If you use IHttpContextAccessor in any services then you may need to mock it for unit tests. It’s quite a complicated class but in order to mock the request URL the below code can be used.

By Shinigami, 3 years ago
Programming

DateOnly in Swagger and API Controllers

The new datatypes of DateOnly and TimeOnly are a good addition to C# but it feels as if they were released too soon without proper integration with other features. An example of this is their integration with API controllers, when added as a datatype to an input or output DTO Read more…

By Shinigami, 3 years ago
Programming

Capturing MySQL Logs from a Docker Instance

If you’ve got a MySQL database running in Docker and you want to debug the calls being made to it you can enable logging and then export those logs to your desktop for investigation. First you need to enable logging in your MySQL database. Then if you trigger the action Read more…

By Shinigami, 3 years ago
Programming

Killing a Process Locking Port on a Mac

When doing development work on a Mac sometimes the process won’t close down correctly and will end up locking a port which will provide an error when you try and start it up again. In order to kill a process on a specific port you first need to get its Read more…

By Shinigami, 3 years ago
Programming

Mocking Hangfire BackgroundClient Jobs

As part of the current project I’m working on we’ve got a service which offloads some email send tasks to a background worker running in Hangfire. Creating the BackgroundJobClient directly in our service was throwing errors and didn’t allow us to test that it had actually been called so we Read more…

By Shinigami, 3 years ago
Programming

Visual Studio CoreCLR Error

I got the below error when trying to start a newly scaffolded web app. The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core. This Read more…

By Shinigami, 3 years ago

Posts pagination

Previous 1 2 3 … 19 Next
  • About
  • Blog
  • Contact
  • Create your website with blocks
  • Sample Page
  • Sample Page
Hestia | Developed by ThemeIsle