Access Host Services from Containers on Windows Server 2016

Occasionally it is necessary to access services running on the host machine from a container. You may be inclined to use localhost to reach the host, but this will not work as the container itself is localhost. Here is how to access host services from a container running on Windows Server 2016. This applies to containers running with NAT networking mode. This is the default, so unless you explicitly use something else, this should work for you.

Accessing a Running Windows Server 2016 Container

Occasionally it can be useful to access a running container. On Linux it is possible to open a bash session with a new instance of the container’s shell with docker exec -it [containername] bash. Because the Docker interface works the same way on Windows it is surprisingly easy to open a command prompt for a running container. Simply execute docker exec -it [containername] cmd. When you want to exit again, just use the exit command.

Access Docker Registry with Self-Signed Certificate on Windows Server 2016

With Windows Server 2016 available it’s time to find out all the little details when using Docker to administrate containers. A common scenario is accessing a private/internal hosted Docker Registry protected with a self-signed certificate (Details). Here is how you enable the Docker daemon and CLI on Windows Server 2016 to use your certificate when talking to the registry. Have your certificate (.crt) file available on the server Copy it to C:\ProgramData\docker\certs.

Update to VSTS Build Extension for Visual Studio Code

An extension that I otherwise thought to be obsolete as a result of an official VSTS extension for Visual Studio Code having been released, has received an update! The number of downloads keep increasing, and it appears it brings some value in addition to the official extension. will be spending some time over the next weeks bringing a couple of new features to it and trying to get feature requests implemented as well.

No Downtime, Continuous Deployment Setup With Visual Studio Team Services and Azure

The goal of this article is to describe a fast way to get started with creating an end-to-end continuous deployment setup with Visual Studio Team Services and Azure. With few resources and in little time you should be able to get a full setup going that deploys a web application to Azure without any downtime for users. The article is split into three parts. This first part will provide a brief overview of the practices applied and services used in the setup.

Debugging Python 3.x with Visual Studio Code on OSX

OSX comes with Python 2.x by default, and setting the default Python version to 3.x is not without trouble. Here is how you debug Python 3.x applications with Visual Studio Code and the Python extension. Open the application folder in VS Code Create a new launch configuration based on the Python template Add "pythonPath": "/Library/Frameworks/Python.framework/Versions/3.5/bin/python3" to the configuration so that it looks similar to the following: { "name": "Python", "type": "python", "request": "launch", "pythonPath": "/Library/Frameworks/Python.

Office 365 Saturday 2016 Slides

This saturday I had the opportunity to give a talk at Office 365 Saturday Denmark 2016, on Continuous Deployment with Visual Studio Team Services and Azure. Even though it was a last minute session I put together as a result of another speaker having cancelled due to illness I think it turned out great. Lot’s of good questions and interest! By request, the slides are available for download. Feel free to reach out if you have any questions!

Ten Useful Visual Studio Team Services Features You Might Not Know

In this post I have gathered ten useful features of Visual Studio Team Services. Many of these are not new features, but you had to dig a little to find out they were there. In the recent months the UI has received several improvements and some of these are now more visible, without having to dive deep in the collection administration. There are also a couple of recent additions that should make your life easier!

Watch your Visual Studio Team Services Builds in Visual Studio Code!

I am starting to find myself spend more and more time in Visual Studio Code. Instead of going to VSTS project sites to view status of my builds, I decided to put it directly into VS Code as an extension. The extension puts a status icon in the status bar which shows the status of a selected build definition. You can find the “Visual Studio Team Services Build Status” extension directly in VS Code or the market place https://github.

Let's Make a Visual Studio Team Services Extension

Recently, Visual Studio Team Services (VSTS) opened up the ability to make extensions with distribution through the Visual Studio Marketplace (https://marketplace.visualstudio.com). The marketplace and API is currently in preview, but I will show how easy it is to create an extension with some of the currently available features. Extensions are made using HTML, CSS and JavaScript. You may also choose to go with TypeScript. The official documentation is also heavy on using TypeScript, so help is available either way.

Developing and Distributing Tools with DNX, DNU and NuGet

npm install -g for .NET? it’s here! There is a (somewhat) hidden gem in the new .NET world with DNVM, DNX and DNU - creating and distributing global tools with ease. Global meaning the application is always available through one or more commands in the command prompt (basically being registered in the PATH system variable). In the Node.js community this has been a central part, allowing you to install useful tools using the Node Package Manager.

Visual Studio Online Build - Building and Pushing Docker Images

In this article we will look at an example of how to build docker images and pushing to a Docker registry using the new cross-platform Visual Studio Online Build. As the running example we will take a small Node.js application, push it to a Git repository and have VSO build take over from there. The goal is to show how to build a docker image and push it to Docker Hub with a Linux build agent.

GOTO Copenhagen Slides

Yesterday I had the opportunity to give a talk on the new build system in Visual Studio Online at GOTO Copenhagen. Great conference overall and good questions afterwards! The slides are available for download.

ASP.NET Web API Request Throttling with Redis Cache

When developing API’s for external parties to consume, sometimes the need for request throttling becomes relevant. In this article you’ll see a simple approach to create such a middleware component for Web API in ASP.NET 5, based on Redis. You can browse or download the complete sample on GitHub at: https://github.com/jlandersen/web-api-redis-request-throttling. Considerations The general case usually is that you have identifiable consumers of your API. The consumers are usually identified based on an access key (or something equivalent) supplied with each request.

xUnit or NUnit with Visual Studio Online Build

Running unit tests as part of the build process with Visual Studio Online requires no effort if you use Visual Studio Unit Testing Framework. But really, not a lot use that these days. I have done a few presentations on using the build services in Visual Studio Online for Continuous Integration. Unfortunately it seems common that it is a bit troublesome to run either xUnit or NUnit tests as part of the build process.

Async Camera Pictures with Xamarin Forms

I have seen different approaches to using the device camera with Xamarin Forms. Here’s an example of how this might be implemented, with an async interface for easy async-await consumption in the shared Xamarin Forms part of the application. I will show the implementation details of the shared code and iOS version. The full example is available on https://github.com/jlandersen/xamarin-forms-camera that includes Windows Phone and Android parts as well. If you are unfamiliar with accessing native features of the different platforms, check out the official documentation.

ASP.NET 5 with Gulp and Bower From an Empty Solution

ASP.NET 5 is on it’s way which will level the playing field a bit in comparison with other web stacks, primarily enabled through the integration of Node.js with Visual Studio. Exciting times indeed! In the project templates provided with the currently available Visual Studio 2015 CTP, the “non-empty” projects are configured with Grunt and Bower. In this post I will walk through setting up an empty solution with Bower and Gulp, an alternative to Grunt.

Multitenancy with Subdomains in ASP.NET MVC 5

Developing a product that is multi-tenant is a pretty interesting challenge. Recently I was in the fortunate situation of having to work on such a thing. By giving organisations access to a tenant through a subdomain of choice is a pretty neat approach that provides users a sense of personal ownership of the product. In this post I will show a simple approach of how to use subdomains to identify the corresponding tenant in ASP.

Xamarin Forms - Customizing Tabbed Page Header and Title on Windows Phone

In this post I will show how to customize the title and header section of the Tabbed Page control, when running on Windows Phone. On WP this is the pivot control being used, which is quite different from the tabs used on both iOS and Android. Let’s say you wish to just change the font or completely restyle the title or the header showing the sections. You can create the complete page as a native Windows Phone XAML page with a pivot control and let that render.

Capptain (or your app telemetry service of choice) with Xamarin Forms

We are increasingly developing applications targeting both iOS and Windows Phone using Xamarin Forms. In this case, when it comes to telemetry, we are interested in putting as much as possible in the shared code. Here is a way to incorporate Capptain into a Xamarin Forms app using DependencyService and a proxy on each platform. You can use the same approach with other telemetry services, as long as a native SDK is provided for the platforms you target.

Dynamics CRM 2011/2013 - Re-register Plugin Assembly With New Strong Name Key

All CRM plugins must be signed with a strong key in order to be deployed (both for letting Dynamics CRM be able to handle assembly naming conflicts and if you deploy it to the GAC on the server). I have come across a couple of projects where the password for the strong name key file was stuck in the head of another person – and later forgotten – making it troublesome set up a new development machine to build and deploy a solution.

Application Insights - Browser Debug Streaming Data Not Showing

Application Insights is the new analytics platform from Microsoft, currently in preview and part of Visual Studio Online. I had the honor of giving a talk on Application Insights during Danish Developer Conference last week which was very exciting. I plan to write a walk through of the new service soon, but for now I will address a small issue people run into. Application Insights has a great development feed that provides raw and instant analysis data that can be used to verify that you send the right data before shipping your app:

Azure Storage Services REST API Authentication from Windows Store and WP8 applications

The Azure Storage Client Library provides some good and easy access to Queue, Blob and Table services. The library requires ODataLib that unfortunately is not available in a version for Store and WP8 yet. The good thing is, we have WCF Data Services based REST API to access the services. The official documentation provides details on the available operations, how to authenticate etc. How to authenticate can be a bit troublesome to derive from the documentation when you are not using the storage client library.

C# - Unit testing classes with HttpClient dependence + using Autofixture

The HttpClient added in the .NET framework 4.5 is simply put awesome in combination with the new async/await in C# 5.0. Also if you are doing Phone development or creating a PCL that targets a platform where HttpClient is not available, do yourself a favour and get it from NuGet. Im gonna go through a way of unit testing code that is dependent on HttpClient, e.g. for retrieving data from a service.

Winning the Startup Weekend 2012 in Aalborg

The last week has been quite special. During the weekend a friend of mine and myself attended the Global Startup Weekend event in Aalborg, simultaneous with events all over the world. I showed up to be useful with my development skills for any project that sounded interesting. However, during the initial idea pitching I came up with my own idea to work on – an electronic math book format for tablets, with integrated interactive assignments.

Custom pushpin icon for Windows Store Apps with Bing Maps and C#

While the Bing Maps SDK is out of Release Preview and made final along with the release of Windows 8, i find that the documentation is still lacking quite a bit. Here is a couple of examples of how you can customize the pushpin control by changing the displayed image overlay, without having to implement a seperate Control. Custom icon for pushpin using XAML and C Add the following to the resources (e.

ABAP Reflection - Part One (The RTTS and Type Introspection)

Reflection provides the ability to examine, modify and create data types and behaviour at runtime. Developers of C# (or Java) not familiar with this concept, have most likely encountered it at some point, or even used it, through the .NET or Java reflection library. Have you ever used the typeof operator or invoked the GetType() methods in C#? Then you have already encountered it first hand. Recently I found the need for reflection in ABAP, all the way from type inspection to creation of new data types at runtime, which I found to be documented only very superficial.

NetMeter tool

I have always been using a small tool to monitor my network usage for various reasons, but recently my favourite decided to take the step away from being a free tool. Instead of tracking down another, I decided to use this opportunity to start a new project of my own, and use it as an opportunity to take a look at WPF for the first time. Currently it simply displays your network usage, but should only be considered an appetizer in its current state – I got some ideas lined up to give this some more sweet features!

Guest mix and new mashup

I recently did a guest mix for a friends radioshow, that was broadcasted on sense.fm – if you should be interested, the mix is available right here. Me and a friend also finished our mashup of the two songs “Andain – Beautiful Things” and “Armin van Buuren – Face to Face (Martin Roth Remix)”, which ended up being* “Andain vs. Armin van Buuren – Beautiful Things to Face”. We were happy (and a bit proud :)) to see Pedro Del Mar play it on the two popular radio shows “Mellomania” and “Mellomania Vocal Anthems”.

Ableton import error "Could not be read. It may be corrupt or not licensed"

Here is a possible fix for you if you encountered this problem when trying to import some of your music files into Ableton. Finally I had some spare time to mess with some music again, but encountered a problem when using Ableton that I had not experienced before. After trying to import some of my music clips in Mp3 format, the error message “Could not be read. It may be corrupt or not licensed” appeared, even though I had done the same plenty of times before.

Dijkstra's algorithm in C#

I had the pleasure of working with this algorithm one year ago during a project on route planning. Recently I encountered this algorithm again during a course, and decided to do a small implementation of this algorithm along with a graphical interface to use it. Use it for anything you want. It finds the shortest path from a starting point to all nodes in a graph, but keeps track of how to get there, so if you want to use it for the shortest path between 2 points, simply follow the previous node located in *path *from the destination point.

Hello world

Hello there, and welcome to my new blog! My name is Jeppe Andersen and I am currently studying Software Engineering at the computer science department of Aalborg University. The main content of this blog will also be related to this, which means I am not going to post my everyday happenings, instead this place will be used as a data dump for various things I find interesting. This can be anything from some tech-news to a small implementation of an algorithm I decided to do after a course at the university.