-
An Overview Of How I Used AI to Level Up in an Open Source, Online Game
About a year ago, I started playing this online game, Mana World. It was pretty relaxing, and it even brought back memories of playing WOW or FFXI. The only thing is it has no real end game. The players fight in one zone from level 100-140 and it’s quite tedious. However, there are some quests…
-
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…
-
A Quicky: DocOpt.Net – Console Applications
Recently, I discovered this Github page here and was pretty floored by the idea. Simply put, the writer documents the console application’s actions in comments and this library will parse them and return a list of key-value pairs containing the options that the user has selected. Here’s some code from their example: Notice how 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,…
-
Auth0, Angular, and .NET Web API Part 2 – Wiring Up Web API
In the previous post, we setup Auth0 and an Angular SPA to allow users to login and logout. Now, I’d like to setup a .NET 6 Web API and communicate with it, using authentication, from the Angular SPA. The Angular SPA will pass a JWT (oauth2) bearer token to the API which will authenticate using…