Deploy dotnet Core MVC on Ubuntu with Supervisor

Introduction I Just purchased a Linux VPS and started to install dotnet core on it and use it for deploying dotnet core apps Removing Apache Most of Linux vps comes with apache so first step is to remove it. sudo service apache2 stop sudo apt-get purge apache2 sudo apt-get autoremove Finally, check if there is any configuration files […]

The Mediator Pattern In .NET Core

A couple of years back, I had to help out on a project that was built entirely using the “Mediator Pattern”. Or more specifically, built entirely using the MediatR library. There were all these presentations about the “theory” behind the Mediator Pattern and how it was a real new way of thinking. I couldn’t help but think… We’ve been doing […]

C# RSS generator in less than than 50 lines of code

What kind of technical blog doesn’t have RSS feed? Well, this one didn’t have one. This short post will present single method for generating RSS feed we are using, and answer why we are not using existing solution. After googling for existing solutions for generating RSS feed, one of the first solution was to use Wildermuth’s RssSyndication library. After trying […]

How to fix failed to retrieve directory listing error in FileZilla FTP

When using FileZilla to connect to your FTP if you encounter an error like this: Status: Resolving address of ftp.website.com Status: Connecting to 11.22.33.44:21… Status: Connection established, waiting for welcome message… Status: Initializing TLS… Status: Verifying certificate… Status: TLS connection established. Status: Server does not support non-ASCII characters. Status: Connected Status: Retrieving directory listing… Command: PWD Response: 257 […]

Why should I inject IHttpContextAccessor as a Singleton

According to comments associated with an issue raised on GitHub https://github.com/aspnet/Hosting/issues/793#issuecomment-224828588 In that sample, you are registering it as a singleton. Shouldn’t it be a scoped instance? It’s fine being a singleton because the backing store is async local. Which got a later reply https://github.com/aspnet/Hosting/issues/793#issuecomment-224924030 Actually if you register it as a Transient on .NET Core then it […]

Cache Implementations in C# .NET

One of the most commonly used patterns in software development is Caching. It’s a simple, but a very effective concept. The idea is to reuse operation results. When performing a heavy operation, we will save the result in our cache container. The next time that we need that result, we will pull it from the cache container, instead of performing […]