-
Uploading Large files with Angular 14 and ASP.NET Core 6
It’s been a bit since my last post, and it was mostly me trying to figure out what to talk about next. I thought this would be an interesting post. NOTE: the code for this blog can be found here. So, uploading large files directly from a web site can be a burden. If the…
-
ASP.NET 6 JWT Unauthorized Issue With Multiple Servers
Not long ago, my company upgraded to .NET Core and had some random authorization issues. Our general architecture is a load balancer that feeds a few API’s. After a user got logged in, he would immediately get logged out… Randomly. This caused us to look at our login process. So, the user would login which…
-
ASP.NET 6 and Dependency Injection
From the beginning of the .NET Core era, Dependency Injection is to be used thoroughly. Controllers, Business Logic, and just about any other dependency can use Dependency Injection. So, what is it and how is it set up? (The source code for this project can be found on Github here.) What is Dependency Injection Dependency…
-
Using RabbitMQ in ASP.NET Core 6.0
Continuing from my last post, here, let’s add the ability for an ASP.NET endpoint to queue a message to RabbitMQ. The source code can be found on Github here, please use that as a reference. First thing to do is to add an ASP.NET Core project to the solution. Right-click on the solution and select…
-
Using RabbitMQ in C#
Often, when dealing with software, there are tasks which take long to compute. As such, you wouldn’t want to compute this directly in an API, but use other methods to calculate it and return it to the user at a later time. (Think generating a report, or dealing with large amounts of data.) Simply put,…
-
Sorting in Entity Framework Core
Continuing from my last post. Let’s add a few endpoints that support sorting. If you’d like the source code, it can be found here. First, I will add a PagingViewModel.cs file to the Database project: This contains the Start index and the Count (which is used for pagination). Also, it has an OrderBy string as…
-
Keeping Windows Services Setup Simple with Topshelf and C#
Windows services have been around a long time. Generally, they’re asynchronous programs that run in the background on a Windows machine. Setting up a Windows service can be tedious – that’s where Topshelf comes to the rescue. From their site (here): “Topshelf is an open source project for hosting services without friction. By referencing Topshelf,…
-
.NET Minimal API’s vs Traditional API’s using K6
This is my first post so I wanted to do something simple. Minimal API’s are new to .NET 6 and there’s a lot of talk about them. If you’re calling a database, are Minimal API’s faster? I say let’s load test it and see if it’s any better than the traditional model. For this, I…