Category Archives: Programming

How I started using MediatR and then how I stopped, part 1

This is a series of posts: Part 1 Introduction Handlers, commands and queries MediatR Back to injecting handlers Part 2 Another option: DecoratR Introduction Today I own the Service Fabric infrastructure piece in my team, to run applications and services … Continue reading

Posted in Programming | Tagged , | Leave a comment

How to combine Key Vault access policy for AAD application and user-assigned managed identity in single ARM template

On other day I was exploring how to grant access for a user-assigned managed identity to a key vault. But here’s a more advanced scenario: let’s say legacy code uses an AAD application to access the key vault and modern … Continue reading

Posted in Programming | Tagged , | Leave a comment

How to create user-assigned managed identity, Key Vault, assign access policy using ARM template

There is already a plenty of materials about managed identities in Azure. But how to create a user-assigned managed identity and grant it the access to a key vault using an ARM template? I tried to find any references but … Continue reading

Posted in Programming | Tagged , | 1 Comment

How to find out the latest ARM api version for given resource type

If you’d like to find this out, for instance, for Service Fabric applications, then use this query: which would yield this result: 2017-07-01-preview2016-09-012016-03-01 what means that you now can go to the GitHub repo with all ARM schemas and find … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Git aliases to combine fetch in the background and checkout/merge/rebase

I decided to write down few useful Git aliases I’m using every day. Or how it looks in .gitconfig:

Posted in Programming | Tagged | Leave a comment

HeartbeatActorServiceType is invalid and cannot be registered. Only ServiceTypes specified in the ServiceManifest can register.

If you try to register an actor within a Service Fabric service like this: but getting the following exception: System.Fabric.FabricException: ‘Invalid Service Type’ Inner Exception: COMException: Exception from HRESULT: 0x80071C21 then in Event Log (Applications and Services Logs -> Microsoft-Service-Fabric … Continue reading

Posted in Programming | Tagged | Leave a comment

Service Fabric and Dependency Injection, part 3: Unit testing

This is a series of blog posts: Part 1: Stateful service Part 2: Stateless service Part 3: Unit testing Unit testing of the final construct we’ve got in previous two parts would be challenging due to a number of reasons: … Continue reading

Posted in Programming | Tagged , | Leave a comment

Service Fabric and Dependency Injection, part 2: Stateless Service

This is a series of blog posts: Part 1: Stateful service Part 2: Stateless service Part 3: Unit testing Update: this approach is incorrect, unfortunately. It actually creates two containers: one to instantiate the service and another to instantiate the … Continue reading

Posted in Programming | Tagged , | Leave a comment

Service Fabric and Dependency Injection, part 1: Stateful Service

This is a series of blog posts: Part 1: Stateful service Part 2: Stateless service Part 3: Unit testing The template of a Service Fabric application that is shipped with Visual Studio instantiates all services explicitly. Like and any other … Continue reading

Posted in Programming | Tagged , | Leave a comment

How to deploy Service Fabric application using ARM template and PowerShell, part 2: ARM

This is a series of blog posts: Part 1: PowerShell Part 2: ARM To publish an ARM template using whichever mechanism you’d like, first you need the actual ARM template. Here’s an example of an application consisting of one stateless … Continue reading

Posted in Programming | Tagged , , | 19 Comments