Multiple deployment configs in one config file with ACL

Most projects that is deployed into production require some kind of config change upon deployment. Often it is the connection string that varies, but it can be any number of custom settings. Forgetting to change the config file when deploying, or forgetting to change config back on your dev machine after deploying can have disastrous… Read More »

Alternative directory layout for MVC

In .Net the MVC pattern is implemented through a template project. The project is set up for you when you create a new MVC application and imposes certain patterns on you. And that is exactly what MVC is, a pattern. By default you will create a controller, a view and a model. Usually you add… Read More »

A lesson in web execution

Loosely based on what I have had the pleasure to work with since the internet hit us back in the 90’s I thought I’d write down the history of web execution. This is in no way a comprehensive list of all technologies. A few years ago web servers mainly contained static content. A few helper… Read More »

Setting up OwnCloud on Windows: Your personal Dropbox

What is this? OwnCloud is a free personal alternative to Dropbox. You run your own server so storage is limited to whatever storage your server has. It has much of the same features (and some more) that Dropbox has, and after a few days use it seems “so far so good”. About this guide This… Read More »

Converting hex string into Color (Windows Phone)

In Windows Phone (Silverlight) there is no System.Drawing.ColorTranslator.FromHtml(“#cccccc”); or similar that can help you convert a hex string into a color object. To do this you’ll have to parse the string yourself. So is a simple method that will do so, it supports both “argb” and “rgb” with or without “#” in front of it.… Read More »

Async callback to awaitable Task<>

The Async-Await feature in .Net is really super. At least until it comes to debugging, exception handling and race conditions. In short it cuts down on code, bugs, complexity and allows for linear programming. Traditional async programming uses callbacks (events) that adds to code complexity, it also forces an unnatural break in your code. Luckily… Read More »

Battlefield Heroes Rcon .Net library

What is BFH? Battlefield Heroes is a free-to-play first person cartoon shooter. 8×8 players battle it out on different maps using traditional weapons and special abilities. My server http://www.battlefieldheroes.com/en/bookmark/server:0104ea2f-1c0f-42a1-b05e-e19e33a6f4ba You need to bookmark, start the game, select “Game finder”, select “Bookmarked” and locate the server to join it. Background For the past few years I… Read More »

Apache WebDAV setup compatible with Windows

Windows supports mounting WebDAV shares as drives. WebDAV is a HTTP protocol for file access used by for example SharePoint. net use Z: http://server/webdav /PERSISTENT:yes /USER:USER PASS It does however not support basic auth by default (basic auth sends password in cleartext, which is bad). It took me some troubleshooting to figure it out so… Read More »