When porting an old .NET MVC/API application to ASP .NET Core application things might not be as straightforward as you’d expect. A personal application that I was porting tumbled and even the most basic scenario wouldn’t work the way I expected (or the way the old .NET MVC used to work). This was nowhere on the massive Microsoft documentation website either. Read on, as I have figured out what was happening. Continue reading
I recently had an interaction with an NServiceBus customer and noticed that they are pushing the log of their import process all the way to the UI. While this may be normal in some cases, but why do you put all the technical details, including exceptions, stack trace, in case of errors in that customer facing log window? The answer was: it is hard for us to gather all the relevant information from a distributed process that’s running in a handful of microservices. When something goes wrong, it is hard for us to gather all the relevant information.
It all boiled down to this: while each individual service capture all the detail of a successfull and failed job, the logs go into individual log files on those services. It is hard to connect these logs across different services. In a nutshell, distributed logging is hard. But does it have to be? Continue reading
With .NET Core now becoming mainstream, you might ask how you can run NServiceBus endpoints in an asp.net process. After all, it sounds pretty trivial, but turns out maybe not as easy as it sounds. Let’s see why. Continue reading
NServiceBus Sagas are a powerful feature that would allow you model long running processes without managing the state on your own or having to juggle correlating messages. Since they manage the state for you and messaging systems being distributed and things running concurrently, they also do concurrency control via Optimistic Concurrency.
Continue readingThe version 2.7 of Farsi Library is now released through Nuget. As stated in the roadmap last year, I’m now integrating the existing functionality into other 3rd party suite of controls. This version integrates with DevExpress controls and supports the new theme and animations. There are two packages targetting DevExpress version 15.2 and 16.1 so you need to pick the right version. Due to amount of breaking change in each major version, I will need to publish new releases targetting each major DevExpress versions. For minor versions you might be able to get away with assembly redirects, depending on the amount of breaking changes in them.
Continue readingBack in 2003 I started to work on a library to use on my line of business applications to address the short-comings around Persian calendar and date controls with proper RightToLeft support. My needs were simple. I was developing business application that needed to be multi-lingual with correct rendering and date displays. Not much to ask, but even simple things like date calculations was not possible as there was not Persian calendar out of the box in .NET framework 1.1.
Continue readingThis has happened twice for me in last month so here’s how I document it since if something happens twice will happen more again.
Continue readingDomain event is a very useful concept in Domain Driven Design that allows you to separate concerns in your domain via events. You can also offload the side effects of the actions in your domain to an event handler and let that run asynchronously. For things like sending emails and notifications this makes perfect sense since those are inherently asynchronous anyway.
Continue reading