Fixing “HNS failed with error : Unspecified error” on docker-compose for Windows

The past few days I worked quite a lot with docker-compose on my windows machine and after something strange happened to my machine that crashed it, I was not able to start any containers anymore that had connectivity over the network with each other.

Every time I used the command-line docker-compose up, I would get a message telling me it failed to start the container. the full message I got was:

“ERROR: for web  Cannot start service web: failed to create endpoint aspnetblogapplication_web_1 on network nat: HNS failed with error : Unspecified error”

Read more →

Design by contract using GraphQL

When interfacing between systems it is good practice to think about the interface design prior to developing the systems. GraphQL can be a useful tool to write down these design decisions using its schema definition language. Even when you are not using GraphQL itself in production. GraphQL’s schema can be used to generate a mock server for clients and can verify whether the responses of the server are valid. This way a clear and precise agreement on the API can be made upfront to avoid costly surprises at the end of the development phase.

Read more

Why don’t monitoring tools monitor changes?

Changes in applications or IT infrastructure can lead to application downtime. This not only hits your revenue, it also has a negative impact on your reputation.

Everybody in IT understands the importance of having the right monitoring solutions in place. From an infrastructure – to a business perspective, we rely on monitoring tools to get us the right information.

Read more →

Azure Functions imperative bindings

The standard input and output bindings in Azure Functions are written in a declarative pattern using the function.json. When defining input and output declarative, you do not have the option to change some of the bindings properties like the name or make multiple outputs from one input. An imperative binding can do this for you. In this blog post I’ll show how to use imperative blob bindings.

Imperative binder pattern
The imperative binder uses a pattern where you add the Binder object in the signature of your Run method. In the function you use attributes to bind the output to the binder. You can bind multiple outputs to the binder, and you are able to combine a declarative binding with the imperative binding. In this case the BlobTrigger is defined in function.json. Do not include the output binding in you function.json:

Read more →

Created an open source VSTS build & release task for Azure Web App Virtual File System

I’ve created a new VSTS Build & Release task to help you interact with the (VFS) Virtual File System API (Part of KUDU API of your Azure Web App). Currently this task can only be used to delete specific files or directories from the web app during your build or release workflow. It will be updated in the near future to also be able to list files or to upload / download files through the VFS API

The reason i made this task was that i needed it at my current customer. We’re deploying our custom solution to a Sitecore website running on Azure web apps using MSDeploy. The deployment consists of 2 parts: an install of the out-of-the-box Sitecore installation and the deployment of our customisations. When deploying new versions we want to keep the Sitecore installation and MSDeploy will update most of our customisations. Some customisations however create artifacts that stay on the server and aren’t  in control of the MSDeploy package that can cause errors on our web application. This new VSTS Build / Release task can help you delete these files. In the future this task will be updated with other functionality of the VFS API such as listing, uploading or downloading files.

The task is available in the VSTS Marketplace and is open source on github.

Let’s have a look how to use this task and how it works under the hood.
Read more →

Force uninstall Visual Studio 2017 Release candidates

If you, like me, are stuck trying to upgrade Visual Studio 2017, then you may only get unblocked by removing everything and starting afresh. Since Visual Studio 2017 is still in Release Candidate and not final, this is something we may have to deal with from time to time.

But when the "uninstall" button in the ui fails, you may end up stuck. In that case, you'll be happy to find:

C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout\installcleanup.exe

Which will perform the same actions as the good old "vssetup.exe /uninstall /force". If that doesn't get you unstuck, there is an even more forceful way:

Delete everything under:

  • C:\ProgramData\Microsoft\VisualStudio\15.0
  • C:\ProgramData\Microsoft\VisualStudio\Packages
  • %appdata%\Microsoft\VisualStudio\15.0*
  • %appdata%\Microsoft\VisualStudio\Packages
  • C:\Program Files (x86)\Microsoft Visual Studio\2017
  • HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\15.0*
  • HKEY_LOCAL_MACHINESOFTWARE\Microsoft\VisualStudio\15.0*
Share This