Category: Development

Developer goodies

So many new (.NET) goodies!

The people over at Microsoft have been working hard and have delivered a lot of stuff. That makes for a nice start after the holidays! So there’s a lot of cool stuff available to play with. I created some simple and easy to remember links for all of these goodies. Feel free to use and distribute …

Read More “So many new (.NET) goodies!”

TypeScript build error TS2322

In one of the projects I’m currently working on we’re using an ASP.NET Core Web API with an Angular front-end. We’re using ADAL.js as an Azure Active Directory Authentication Library and ng2-adal for integration with Angular. To get the type declarations for all these packages in TypeScript we use The Future of Declaration Files. Some time …

Read More “TypeScript build error TS2322”

Hack Yourself First Hoodie

Security workshop: Hack Yourself First

My employer Betabit hosted a Hack Yourself First workshop by Troy Hunt on Monday 5th and Tuesday 6th of June. Because we are always looking to improve, this was a great opportunity to tune up our security skills. We had a great time, got terrified and most of all: we learned a lot. You think you …

Read More “Security workshop: Hack Yourself First”

Unable to attach remote debugger after Visual Studio 2015 Update 2

As the title states: I was unable to attach the remote debugger (for instance to an Azure Web App) after installing Visual Studio 2015 Update 2. I got an error with something about invalid memory access or something like that. The solution is simple: install Remote Tools for Visual Studio 2015 Update 2. Go to …

Read More “Unable to attach remote debugger after Visual Studio 2015 Update 2”

Exception with EF code first migrations

Just ran into an exception when running both update-database and add-migration in the Package Manager Console for an EF Code First project. The Exception read: The type initializer for ‘System.Data.Entity.Migrations.DbMigrationsConfiguration`1’ threw an exception. The cause? An invalid config file for the project I was trying to run the tools for. So: if you run into …

Read More “Exception with EF code first migrations”

Error saving Galileo Wiring App in Visual Studio

Last week I received my Intel Galileo board (from windowsondevices.com) and I started playing with developing for it yesterday. I created a first test project, but it didn’t run. Visual Studio couldn’t find the Arduino header file, which was probably due to a missing NuGet package (the Galileo C++ SDK). I tried to save the …

Read More “Error saving Galileo Wiring App in Visual Studio”

Getting Bootstrap to work on Windows Phone 8

There are a couple of websites I manage that use Twitter Bootstrap*. These websites are fully responsive and work well on all devices. Or actually, almost all devices. The wrapping of columns in a container on a Windows Phone doesn’t work the way you’d want it out of the box. Windows Phone interprets device-width as …

Read More “Getting Bootstrap to work on Windows Phone 8”

Error: The Path ‘path’ is already mapped in workspace ‘workspace’

Just a quick little post today: I got the error “The Path ‘path’ is already mapped in workspace ‘workspace’” when I connected to a new Team Foundation Server and tried to map my workspace today. I had connected to a Team Foundation Services project a while back to get some shared code, but I already …

Read More “Error: The Path ‘path’ is already mapped in workspace ‘workspace’”

Visual Studio 2012 crashes when opening an ASP.NET MVC project with a cshtml open

A rather long title for this post, but that’s exactly what happened: when I opened an ASP.NET MVC 4 project with a cshtml view open, Visual Studio would crash with the error messages seen on the right. This would only occur if the first project I opened had a cshtml file open. When I opened …

Read More “Visual Studio 2012 crashes when opening an ASP.NET MVC project with a cshtml open”

How to add Next and Previous buttons to Twitter Bootstrap tabs

Just a quickie today: when working with Twitter Bootstrap tabs, like I am in my ASP.NET MVC 4 project, you might want to add Next and Previous buttons on the tabs to create something of a Wizard. Here’sa step by step overview of how I did this: Add an ID to all the ListItem elements …

Read More “How to add Next and Previous buttons to Twitter Bootstrap tabs”

How To: Call a generic method with a runtime type

Problem:Developing a generic class that maps datasets, datatables and datarows from a legacy system to my domain model, I ran into an issue. I wanted to call a generic method with a runtime type. Lets say the method looked like this: public string DoSomething<T>(string param). Because I use reflection to iterate properties on a type, …

Read More “How To: Call a generic method with a runtime type”

How To: Create an ActionLink with a Twitter Bootstrap icon in MVC4

Twitter Bootstrap is a… “Sleek, intuitive, and powerful front-end framework for faster and easier web development.” One of the nice things in Bootstrap is you can use icons from Glyphicons. To use these, you can simply use this markup <i class=”icon-fire”></i> get a nice fire icon (). Translating this into an ActionLink styled as a …

Read More “How To: Create an ActionLink with a Twitter Bootstrap icon in MVC4”

TIP: “Paste XML as Classes” in Visual Studio 2012

In the past, when you had some XML document that you wanted to translate into classes we had to create / generate a schema based on the XML file. Next, we had to generate a class based on the schema with an external tool. Not all too user friendly and somewhat time consuming. In Visual …

Read More “TIP: “Paste XML as Classes” in Visual Studio 2012”

Documents.Open returns null, running Word automation under ASP.NET on x64

When building an ASPapplication that generates Word documents,  it was working fine on the local machine. A windows XP installation with Office 2007. When we deployed it to windows 2008 (64 bit) and Word 2007 we saw that Documents.Open returned null. Other than this, there are no exceptions. The code that returned the error (simplified): Application app = new Application();Document doc …

Read More “Documents.Open returns null, running Word automation under ASP.NET on x64”

Unhandled exception installing SQL Server 2008 R2 on a Windows XP / Windows 7 machine

When installing SQL Server 2008 R2 on a Windows XP (or, according to the comments, Windows 7) development machine that has been around for quite some time, I got an error stating an unhandled exception occured in the application (see image). The error showed up directly upon startup and read: An error occurred creating the …

Read More “Unhandled exception installing SQL Server 2008 R2 on a Windows XP / Windows 7 machine”