Edward Cooke

Edward Cooke

Something cool
Operations

StrongSwan, IKEv2, Split DNS and iOS

This post is about getting the DNS servers to work correctly on Mac OSx when doing split tunnel (not sending all traffic across the VPN). I use StrongSwan as my VPN server and only want my local network traffic to go across the VPN and all other traffic to go out over the client's regular internet connection. The problem was that on the Mac (didn't test with Android/iPhone) it would not resolve the internal dns requests. Windows clients worked as expected. I spent a few hours figuring this out a
1 min read
Tfs

Copy all repositories from Github enterprise

We are finally finishing the migration of GitHub Enterprise to TFS. While doing so, we wanted to programmatically make sure we had all of the source code off of our old Github server. Including those that belonged to individual users, including those that had left. Unfortunately Github doesn't make a utility for this. So I set out to do it on my own. Since we are Windows shop and I'm wanting to get my PowerShell skills better, I set out to do it in PowerShell. The trick was getting the list of
1 min read
Tfs

Octopus Deploy/TFS and Lessons learned

Ok, in my previous post I went over why we chose to use Octopus Deploy and TFS as our build and deployment pipeline. Now I'm going to go over some things I've learned while implementing that solution. Those things and the reasons behind them are bolded. The rest of it is more detail and examples. It may seem like a lot, but it's really not and it's mostly good with some gotcha's. For both: * Don't be afraid to fail. It'll take a while to figure out exactly what works well for your particul
4 min read
DevOps

Octopus, TFS and Blue Green Deployments

Ok, so lets start this off with a little background of where we came from and where we wanted to get. Our current environment consisted of a development environment with a single server on the same domain as the deployment server. And a production environment at a 3rd party hosted environment not on the same domain with no direct connectivity to the build/deployment server. We used GitHub Enterprise on-premise for source control and TeamCity for continuous integration and deployments. Producti
2 min read
DevOps

node/npm/gulp/continuous integration

Alright, so I have continue integration for my new dotnet core applications. Building works great. It's now time to publish. I'm using gulp on my pre-publish commands to move files, compile typescripts, minify css/javascripts, etc. It works fine for my user after running npm install gulp -g. But, because I want all of my publish and builds to be self contained, and it also doesn't work when running under my build user spitting out an error saying Error : 'gulp' is not recognized as an internal o
1 min read
Operations

Web Based Password Generator

Ok, so this is kind of a little thing I did. I wanted a page that would generate a password without anything done on the server side. I wanted it all to be done on the client. I also wanted the ability to exclude certain characters, but yet allow others of a category. For example, one of our old legacy systems doesn't handle quote's very well, so I want to exclude quotes from the generated passwords. So, I set out to create one. It's done entirely in javascript with no server post back (for the
1 min read
Operations

WSUS/Server 2012R2 and HTTPS

I wanted to switch my WSUS implementation over to https. Because I like https and there is rarely ever a reason not to use it. So, I set up my bindings in IIS and setup my group policy to point to the correct URL. After I got all of my clients updated with the new policy, they all started failing on checking for updates. They were getting a less than helpful "Not found error". The code is 0x80244019. While I was enabling the bindings for https, I was wondering what kind of services they were, be
1 min read
ASP.Net

Custom model validation in ASPNET Core

I just wanted to post how to do custom model validation. It took me a few hours and it wasn't posted anywhere yet. So, I wanted to do my own model validation so I can call ModelState.IsValid and get whether the posted model was valid or not. I needed some custom code. In my case it was to make sure that only 1 of 2 boolean properties were set to true. After digging through the sources I found an easy way. Implement the System.ComponentModel.DataAnnotations.IValidatableObject interface. The def
Programming

ASP.NET vNext Custom Authentication

Welcome all, here's my delima. I need to be able to implement my own custom Authentication middleware in vNext. I needed to do this because of a requirement where I cannot use cookies. Reason being is that my site will be iFramed into another application. I know, its not a good solution, but it is what it is. There was little to no documentation on how to implement your own authentication middleware so I set out on a journey. It's relatively easy to set it up and get it going. Now, this is not f
3 min read
C-Sharp

VSO Build and File Select/Exclude

Hey all, so today I wanted to use the new (finally) feature of pushing nuget packages to nuget feeds inside of Visual Studio Online's build environment. Which is turning out to be really awesome by the way. Anyways, I'm doing a vNext project and it creates 2 nuget packages *.nupkg. I create a new Nuget Publish task and it set the default. First, it won't work correctly, it'll try and upload some downloaded nuget packages. Lame. So we need to change the default of **\*.nupkg to **\artifacts\**\
2 min read