Posts Tagged: dotnet

Stay up-to-date with the latest news, tips, and insights on the .NET Framework and learn how to build, deploy, and manage your applications.

Tag RSS Feed

Posts In 2024

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnetaspnetcore

    Change happens. People will leave your team and people join your team. But what if there was an easy way to get new people up to speed in minutes, not weeks. Imagine clippy could hold your hand through a code base which you can easily refer back to at any time. The best bit? Anyone can do this.

Posts In 2023

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    The Factory Design pattern is a popular technique for creating objects in .NET applications. It allows developers to create objects without specifying the exact class of object that will be created, making it an excellent option for improving code flexibility and maintainability. This article will explore the concept behind the Factory Design pattern, its benefits, and how it can be implemented in C# code.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    In this video, Stu demonstrates how to use the dotnet test feature to debug two types of test failures: test crashes and test hangs. Stu shows how to use the “blame-crash” parameter to generate sequence and memory dump files to help diagnose test crashes, and the “blame-hang” parameter to collect hang dumps when tests exceed the given timeout. He also shares how to set these parameters as csproj properties to achieve consistent debugging behavior. By the end of this video, viewers will have a valuable tool to help them save time when debugging test failures.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    The Decorator design pattern is a widely-used technique for extending the functionality of an existing object or component. By wrapping an object in a series of decorators, you can add new behaviours, features, or properties without modifying the underlying code. This makes it a powerful and flexible way to customize and extend software systems. In .NET, the Decorator design pattern can be used in various ways to enhance and modify existing classes and components, which can help you write more maintainable, extensible, and flexible code.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    As a .NET developer, you understand the importance of writing efficient, scalable, and maintainable code. One design pattern that can help achieve these goals is the Singleton pattern. The Singleton pattern is a creational pattern that ensures only one instance of a class is created and provides global access to that instance throughout the application. In this blog post, we’ll look in-depth at the Singleton pattern, exploring its benefits, use cases, and implementation in C#. By the end of this post, you’ll have a solid understanding of how to leverage the Singleton pattern to optimize your .NET applications.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    In this first interview of a series, we’re meeting the founders of WeAreDotnet, a new .NET community. Tim shares his motivations for starting a new community with Matthias & Gerald and their plans for its future. We dive into what sets WeAreDotnet apart from other .NET communities, how they aim to help developers grow their skills, and the kind of events and resources they offer. Join us as we get to know this exciting new addition to the .NET community landscape!

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    As a .NET developer, you’re probably familiar with the importance of design patterns for creating maintainable and flexible code. The Builder pattern is one of the most potent creational patterns in the .NET ecosystem. In this blog post, we’ll dive deep into the Builder design pattern, explaining what it is, what problems it solves, how to implement it in C#, and answering frequently asked questions.

Posts In 2022

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnetaspnetcore

    Go from zero to docker image in 30 seconds! In this video, we’re going to discuss the changes that are happening with publishing apps in .NET 7. I’ll show you how to make the changes backwards compatible with .NET 6 and how to customize your experience.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnetaws

    Let’s look at how to use AWS Timestream in .NET. Timestream is a managed time series database from AWS. It’s fast and scalable, with advanced features like scheduled queries.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnetaspnetcore

    Mockaco is an HTTP-based dotnet API mocking server with fast setup - great for when you need to setup a mock API to test locally. As Mockaco is also a docker image, we can utilize this in our build pipelines to get some confidence in our tests without requiring external dependencies.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetaspnetcore

    This blog post is also available as a video on my YouTube Channel. If your API is a key part of your product you are going to want to version your APIs. One of the major reasons that we consider versioning our api’s is so that we provide a consistent experience for our users. If we consistently change our API’s then our consumers will break, they will get annoyed and eventually leave our product.
  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetaspnetcore

    This blog post is also available as a video on my YouTube Channel. If your API is a key part of your product you are going to want to version your APIs. One of the major reasons that we consider versioning our api’s is so that we provide a consistent experience for our users. If we consistently change our API’s then our consumers will break, they will get annoyed and eventually leave our product.
  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetaspnetcore

    This blog post is also available as a video on my YouTube Channel.

    Ever wondered how to get docker images to run nicely with XUnit tests? Then you’re in the right place. Let me show you how to setup Localstack with XUnit properly so that the only thing you need to worry about is having docker running. I’m using Localstack as the example but you can repeat a very similar process using the techniques shown here.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    If you’re relying on your CI pipeline to start up your docker containers, or not seeding your data in localstack before your tests start then this video is for you. Learn how to spin up a localstack aws instance correctly with xunit and never worry about doing anything else other than start docker & dotnet test.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnetaspnetcore

    Versioning API’s can be extremely important for your product. Learn 4 different ways to version your APIs in .NET minimal APIs and .NET MVC APIs. The techniques you’ll learn are: content type negotiation versioning, custom headers versioning, query string versioning and URL versioning.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    Take a quick look at the new .NET 7 source generator for Regex. Check out the full video here: https://www.youtube.com/watch?v=6USQ3_81wQM

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    Recently, I needed to compare the current performance of .NET serializers for a project. In this video, I compare the current state of the serializers and produce some interesting results.

    Link to the benchmarks repository: https://github.com/Im5tu/SerializationBenchmarks

    Json Serializers


    Binary Serializers


  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    With .NET 7 just around the corner, we have a better idea of the features that are going to in it. Let’s take a look at 10 features you can use today: https://www.youtube.com/watch?v=6USQ3_81wQM

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    With .NET 7 just around the corner, we have a better idea of the features that are going to in it. Let’s take a look at 10 features you can use today: https://www.youtube.com/watch?v=6USQ3_81wQM

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    With .NET 7 just around the corner, we have a better idea of the features that are going to in it. Let’s take a look at 10 features you can use today. Links to all of the features can be found below.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnetaspnetcore

    For the full video, go here: https://www.youtube.com/watch?v=oNQdDjvS_54

    Creating a restricted file download with S3 is easy with pre-signed URLs. But what your endpoint isn’t a file? Or you’re not sourcing it from S3? In this video, we take a look at an upcoming technology called PASETO (platform agnostic security token) and see how to create an endpoint that is restricted by time.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnetaspnetcore

    Creating a restricted file download with S3 is easy with pre-signed URLs. But what your endpoint isn’t a file? Or you’re not sourcing it from S3? In this video, we take a look at an upcoming technology called PASETO (platform agnostic security token) and see how to create an endpoint that is restricted by time.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    Inspired by a blog post and video from two of .NET’s biggest content creators, I decided to take a look an old trick I knew to see how it compared to the performance improvements in .NET 7 using .NET 6 as a comparison. Stay until the end for something really mind bending!

  • (Video)

    Published by Stuart Blackler on: Tagged:devopsdotnetopentelemetry

    Recently we’ve looked into adding logs, metrics & traces using console exporters. In reality, we want to send this telemetry to one or more places. Collectors allow your service to offload data quickly, standardise access to protected exporter endpoints and can take care of additional handling like retries and batching.

    In this video, you will learn:

    • The difference between the standard collector and the contributors collector
    • How to run an OpenTelemetry Collector using docker compose
    • How to configure an OpenTelemetry Collector
  • (Video)

    Published by Stuart Blackler on: Tagged:dotnetopentelemetry

    Metrics are often handled via one of many protocols. The new contender to this is OpenTelemetry - a system for sending your logs, traces and metrics. This OpenTelemetry tutorial will guide you through how to setup a .NET Application to export your .NET metrics and do basic processing. You’re going to learn the following:

    • How to edit and drop metrics
    • How to setup application metrics with OpenTelemetry using the console exporter
    • How to add external instrumentation like runtime metrics
  • (Video)

    Published by Stuart Blackler on: Tagged:dotnetopentelemetry

    You’ve discovered that OpenTelemetry can send logs as well as traces but you’re not sure how set this up? This OpenTelemetry tutorial will guide you through how to setup a .NET Application to include log exports and do basic processing. All your logs and traces will be linked automatically.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    Learn two slightly different approaches to using NuGet Packages as part of the C# Source Generators you’re building. You may want to do this to parse a configuration file from a YAML based format. Now, you could either write the YAML parser yourself, or like most others, I would prefer to use a pre-built and tested NuGet package.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    Learn possibly the quickest way to version a .NET NuGet package or Application with minimal fuss by using MinVer. Source code available to all of my sponsors in the link below.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    Ever wanted to see the files generated by .NET Source Generators? Ever wondered what the effect of your changes to your generators are? Well this is the video for you. See how you can output the generated files and potentially save them in Git.

    Warning: if you generate thousands of generated files and don’t tell you co-workers first, they might be annoyed…. :D

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    Want to know how to set your global usings across all your packages simply by using a .NET NuGet package? Then this is the video for you. I’ll show you how to setup your NuGet package and which properties and files to create for all the magic to happen.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    In this video, we’re going to talk about how to increase the reliability of your applications using Polly. Polly is a software that allows you to monitor the reliability of your applications and make improvements as needed. By using Polly, you’ll be able to identify and fix reliability issues early, saving you time and money in the long run. This video will teach you how to use Polly to increase the reliability of your applications, so be sure to watch it!

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    In this article, we’re going to take a look at the different ways that you can make your .NET applications more stable by using 3 different patterns: Retrying with decorrelated jitter, bulkheads and circuit breakers.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnetaws

    In this video we’re taking a look at how to extend the AWS SDK for .NET, which can be useful for various tasks like adding in some custom observability components into the request pipeline. This article is a companion resource for the video linked above in case you prefer a written version. I’m actively using the approach described here to implement distributed tracing for all my AWS calls.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetaws

    In this article we’re taking a look at how to extend the AWS SDK for .NET, which can be useful for various tasks like adding in some custom observability components into the request pipeline. This article is a companion resource for the video linked above in case you prefer a written version. I’m actively using the approach described here to implement distributed tracing with OpenTelemetry for all AWS calls at work.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    This is the next part of my series taking a look at some of the lesser known features of the C# language. Today we will be looking at duck typing and how it is used in C#. Much like the previous article, your millage may vary in terms of actually using these features for day to day programming, so think of this series as raising awareness that these things exist, not that you should use for general purpose programming. Without further adieu…

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    This is the first part of my series taking a look at some of the lesser known features of the C# language. Today we will be looking at index parameters, specifically how to use params with them, and how they are used in C#. With these articles, your millage may vary in terms of usability of these features for day to day programming, so think of this series as raising awareness that these things exist, not that you should use for general purpose programming. Without further adieu…

Posts In 2021

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    Transitive dependencies can be problematic when the same package is registered in multiple projects. Learn how to use a tool called Snitch to clean up your .NET project files and prevent future problems.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnetopentelemetry

    Following on from our introductory video, this OpenTelemetry tutorial walks through how to add custom ActivitySources that can be used in many libraries such as OpenTelemetry to support a distributed tracing scenario, without creating any dependencies. This is incredibly powerful for .NET library authors as they don’t have to wait for .NET 5 to take advantage of this amazing capability.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnetopentelemetry

    In this OpenTelemetry Tutorial, take a look at how to quickly get up and running with OpenTelemetry in an ASP.NET Core application. You’ll learn how to setup the automatic instrumentation for both inbound and outbound web requests and how to configure the Jaeger Exporter (https://jaegertracing.io) - running it all in a local environment.

    For more information about the differences between OpenTelemetry and what is available in .NET out of the box, also checkout this article by Rehan Saeed: https://rehansaeed.com/deep-dive-into-open-telemetry-for-net/

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnetaws

    Ever wondered how to answer the architecture design questions in interviews? If so, this video is for you. I take a sample of what I often receive as an architecture test and walk through how I would design the architecture on AWS explaining each design decision on the way - often with notes about the technology capabilities along the way. We will also go through some common questions that are often thrown in as curve balls during the process - including how to prevent them through efficient design.

    Nothing in this video is scripted or prepared in anyway, just the scenario, the camera (which died) and my thoughts. Please do your own research on the techniques presented here before you implement them in your architectures to make sure you have a real understanding of how it all works.

    If you like this video and want to see more like this, or have a scenario you would like me to cover, please let me know in the comments below and we can explore new scenarios together :)

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    In this NuGet tutorial, learn how to set common package tags in your csproj, enable deterministic builds, enable SourceLink for your packages and validate them using dotnet validate and NuGet Package Explorer.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    Learn about the use cases for stateless workers in Microsoft Orleans, and how to use them. This video is part of the Running Microsoft Orleans in AWS series. If you missed the introduction, or want to watch more in the series, see the playlist here: https://bit.ly/orleans-code-with-stu

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    Ever wish that you could share your .NET project properties across multiple projects? Or debug that funky build? In this video, you’ll learn at least 5 different tips and tricks to hack and improve your .NET builds by leveraging some cool features that MsBuild has to offer.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevopsaws

    As more and more companies get hacked, there is a strong resurgence in the community for the desire to have TLS for everything, everywhere. There are many valuable projects, tools and resources, such as LetsEncrypt available to help both individuals & companies secure their resources. One of those tools is AWS Private Certificate Authority.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    Following on from the previous video, you’ll learn how the difference between timers and reminders in Microsoft Orleans, and how to implement each one. This video is part of the Running Microsoft Orleans in AWS series. If you missed the introduction, or want to watch more in the series, see the playlist here: https://bit.ly/orleans-code-with-stu

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    Following on from the previous video, you’ll learn how to implement a basic incoming and outgoing call filter in Microsoft Orleans. This video is part of the Running Microsoft Orleans in AWS series. If you missed the introduction, or want to watch more in the series, see the playlist here: https://bit.ly/orleans-code-with-stu

Posts In 2020

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    In a world where we use auto-scaling a lot, its often not just one metric that we will take into consideration when deciding whether or not to scale our applications. For example, we might have a combination of CPU usage, memory usage and web request latency. Some services like AWS CloudWatch Metrics only allow scaling based off a single value. Luckily, we can blend metrics together to create new ones, which we can then use in our scaling policies. A blended metric is made up of however one or more existing metrics that you choose, called aspects, and can be published as if it were any other metric, eg: publish to DataDog/Cloudwatch.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevopsaws

    In a previous post I took a look at how we can utilize .NET event counters to record metrics in our applications. However, I never covered the implementation of how I write the metrics to either CloudWatch or DataDog. In this article, I’m going to take a look at how to publish metrics to CloudWatch and one way of integrating it with the aforementioned blog series.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    Following on from the previous video, you’ll learn how to setup clustering with DynamoDB as the backend. This video is part of the Running Microsoft Orleans in AWS series. If you missed the introduction, or want to watch more in the series, see the playlist here: https://bit.ly/orleans-code-with-stu

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevopsaws

    In the vast majority of companies that I’ve been in, software engineering & infrastructure best practises have often been left as something that needs to be updated later because building the product comes first. This is completely understandable as if you don’t have a product, you don’t have employment. This presents problems later when companies are beginning to scale rapidly and become popular. Not only does the company becomes a target for malicious actors, but security-related incidents can easily occur by leaving storage devices open accidentally. Once a malicious actor is in your system, you usually have pretty big problems unless you design your architectures with Zero Trust in mind.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    Following on from the previous video, you’ll learn how to setup grain persistence with DynamoDB local. This video is part of the Running Microsoft Orleans in AWS series. If you missed the introduction, or want to watch more in the series, see the playlist here: https://bit.ly/orleans-code-with-stu

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    In this article, I want to take a look at a scenario that I came across this week which I’ve come across a few times. Occasionally, you will have an interface that you wish to mock out with Moq and find you have troubles because the method signature takes a ref or an out parameter. This week, I’ve found a way that we can successfully mock the method without too much of a change to the test code.

  • (Video)

    Published by Stuart Blackler on: Tagged:dotnet

    In this video, I’m going to take you through an Introduction to the Microsoft Orleans actor framework. You’ll learn:

    • What is the virtual actor model?
    • What is a grain?
    • What is a silo?
    • How this works in conjunction with AspNetCore using the Generic Hosting Model
  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevops

    Over the past few months, I’ve been looking into the internal architecture setup for Checkout.com and seeing how we can scale it for the next few years. As part of that research, I’ve been looking into the CloudEvents specification as a potential option as the basis for a common event schema across teams.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevops

    In my previous article, we took a look at setting up a template repository for our .Net projects. Repository templates can massively help with the consistency and startup speed of a new project. In this article, we will take a look at a different repository template that I’ve been using for work for running our performance tests.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevops

    Over the past few weeks, I’ve been updating some of my projects to latest standards, adding in Github Actions where appropriate etc. Most recently I’ve setup a template repository in Github.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetaspnetcore

    Recently, we’ve had the need to build a few feature toggles in our applications that can be changed at runtime. This article walks through a simple approach that you can use in your applications, including a description of a route to dynamic feature toggles.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetarchitecture

    Over the past year or so, I’ve had the pleasure of mentoring people on their software development journeys. Some of those personnel have expressed a desire to pursue the software architect route. As it’s something that I often refer to, I’ve decided to post a mini-pathway to help guide on some of the basics.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevopsgit

    Git aliases are used to create new git commands that can either invoke a function, or be used to create commands that map to longer commands. For example, we could map git co to git checkout or have git undo undo our previous commit. In this article, I’m going to show you some of my favourite git aliases.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    In a previous article, we took a look at a way to use dotnet-counters with an external image. This article takes a look at how we can embed the tooling that we require into the image so that we extract the counter/memory information as required. This approach does not require elevated permissions as before.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetaspnetcore

    In my previous article we took a look at how to monitor outbound HTTP requests using a DiagnosticListener. In this article, we will re-use some of the same components to monitor inbound HTTP requests. We could use middleware to do as most approaches do, but this approach is highly dependent on the middleware that you have and the duration of this, so we will re-use some of the code from last time.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    Throughout the course of my Diagnostics in .Net Core series, we’ve taken a look at the basics of how to use the Event Counters API. In this article, we will take a look at how we can capture all outbound HTTP requests automatically as they occur.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    In my previous post, I described how we can leverage the new EventCounter diagnostics API to add custom event counters and listen for built in counters. In this article, I will walk through how we can leverage the dotnet-counters tool with a running docker image.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    Recently, I’ve been playing with the new diagnostic improvements in .Net Core 3. Traditionally, I’ve always used the great AppMetrics package to capture the metrics from our applications and send scrape them with a Prometheus & Grafana setup. Whilst reading about the improvements, I wondered whether or not it would be possible to push metrics to Prometheus.

Posts In 2018

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetaspnetcore

    Recently, I have been looking at the Utf8Json project and evaluating for use in our high performance payments API. Looking at the benchmarks on the Github page, and running my own benchmarks, the numbers stated seemed to tally up, so I built a few media formatters for aspnet core.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevops

    In my previous article, we setup a standarised build using the new YML build definitions within VSTS, using the .Net CLI tooling. In this article, we will use the same setup as our base, but we will build and publish a service fabric application.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevopsaspnetcore

    In this article we will explore a preview feature inside of Visual Studio Team Services (VSTS) called YML Build Definitions. In essence, this allows you to change your build process from a .yml file in your git repository much in the same way as you can do with other services such as AppVeyor. During the article, we will setup a build definition for an Aspnet Core website.

Posts In 2017

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevopsseo

    In this article, we will increase our websites level of protecting against Cross-Site Request Forgery and Cross-Site Script Inclusion attacks by appending an additional modifier to the Set-Cookie HTTP header.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevopsseo

    In this article, we will take a look at secure cookies, that is by appending an additional modifier to the Set-Cookie HTTP header.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevopsseo

    In this article, I will give a brief overview of cookies, why we want them to be httpOnly and how we can ensure this via URL Rewrite. We will also be creating our first outbound rewrite rule with a pre-condition.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevopsseo

    In the previous post, I explained why canonical urls are important and how to enforce them . In this article, I will show you how to have a canonical host url.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevopsseo

    In the previous post, I gave a brief intoduction to URL Rewriting and showed you how to get from HTTP to HTTPS. In this article, I will show you how to have a canonical host url.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevopsseo

    In this series, I am going to take you through a few web.config snippets that have come in handy for me when using URL Rewrite on IIS. Firstly, I am going to introduce the URL Rewrite module then show a sample of going from HTTP to HTTPS.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetarchitecture

    These are my notes on domain driven design whilst watching the course by Dino Esposito on Pluralsight.

    Domain Driven Design (or DDD), is the process of discovering both data and behavioural requirements for a given problem domain where traditional approaches usually focus purely on data collection aspects. The aim is to provide better tools to tackle the complexity at the heart of software.

Posts In 2016

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    This article is a rework of a draft that I’ve had sitting in my drafts folder for a long while now. Over the last six months or so, I’ve been reviewing a lot more code than I had previously thanks in part to a promotion and in part, code reviewing applicants coding entries. Some of the code has been good, with some code, really not so good!

Posts In 2015

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevopsgit

    We’ve all experienced a time where we use our pc’s for a prolonged period of time, accumulating a ton of crap along the way as we try out various technologies and fads. After a while, the pc begins to do funny things like crash for no apparent reason. This week, I needed to rebuild my dev machine and decided to change from Atlassian’s Source Tree over to Powershell and raw git.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevopsazure

    Recently, I had to automate some tasks in Azure. This is the easiest way I could get started.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetdevopsdevelopment

    As part of my role as a .Net Developer, I have recently been getting to grips with the build and deployment features of both Teamcity and Octopus Deploy. This has been making me think about the industry buzz word “DevOps” and exactly what that means.

Posts In 2014

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    MSMQ is Microsoft’s Message Queuing service that can be used to implement both synchronous and asynchronous solutions. Typically solutions are architectured using the available C++ API’s or via the relevant COM objects. The .Net Framework exposes the System.Messaging namespace which contains all the classes that you need to work with the MSMQ API.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    Message queues are a substantial part of modern day enterprise architectures and a vital part of providing scalable solutions. They are designed for asynchronous communication between different parts of the system. They help scale individual components of a system and increase reliability with the optional addition of the persistence of messages to a storage system.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    Today I just wanted to share a quick note regarding a Stack Overflow answer that I recently came across. In the answer the author explains that a call to Expression.CanReduce will typically return false, while Expression.Reduce() will return the current expression. The author continues to state that one of the types that overrides Expression.Reduce() and Expression.CanReduce is MemberInitExpression.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetjava

    I have recently begun studying the theory and implementations of algorithms. During this study, I came across this post which describes how a bug exists in most implementations of a binary search algorithm.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    Today I wanted to cover something that is not often covered when unit testing an object. If an object has the Equals method overridden, then there are a number of tests that we should be running as a minimum:

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    In my previous post, I discussed how to enable HSTS via MVC Action Filters. I thought that I would just do a follow up post showing you how to enable it via the web.config.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnetaspnetcore

    After reading Troy Hunt’s free ebook on the OWASP Top 10 for .Net Developers, I discovered an additional mechanism to help developers secure their websites. That mechanism is HTTP Strict Transport Security.

Posts In 2013

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    In this article, I am going to show you how to use the IDisposable interface correctly in your code. When I read other’s code, it is easy to pick up on subtle bugs. We need to begin to train ourselves to see the bugs and we do this by understanding what we are using. Before we begin, we need to make sure that we understand a core piece of computer science theory: Destructors.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    In this post, I am going to show a small micro-benchmark to demonstrate the performance difference between the Semaphore and SemaphoreSlim classes in C#. A Semaphore is often used to restrict the number of threads than can access some (physical or logical) resource. In this case, we want the restriction to be as little as possible.

Posts In 2012

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    On a project I have been working on recently, I came across a problem where under Windows an Mdi Child form would flicker when it loads. Trying to find information on what was the cause of this was near impossible. I ended up trying a lot of code snippets that I found when googling the problem and this is what I have come up with.

  • (Article)

    Published by Stuart Blackler on: Tagged:dotnet

    In this article we will take a look at what extension methods are and how to use them in .Net. Personally, they are one of the best things that has been introduced into the .Net framework in terms of readability. I will take you through what extension methods are, how to create them (in c# and vb) then I will show you some of the extension methods that I have created (in c# only, conversion is for you to try).