Monthly Archives: April 2013

ASP.NET Web API and greedy query string parameter binding

Following the last article on parameter binding from URI, I received an interesting question – “what if I wanted to prevent binding parameters from query string and only allow binding from route values”? In other words, prevent passing values to actions via query strings and only look for them in the route itself (to avoid duplicate ways of reaching the same endpoint).

This is possible in Web API – let’s explore how you’d go about implementing it.

More after the jump.

Continue Reading


ASP.NET Web API parameter binding part 1 – Understanding binding from URI

Today, let’s kick off a series intended to look at different aspects of HTTP parameter binding in ASP.NET Web API. Why? Aside from the awesome series by Mike Stall, there isn’t really that much material on the web on this particular subject. And developers coming from MVC background, often get surprised by differences in the model binding mechanism between MVC and Web API.

In this first post, let’s have a brief overview of parameter binding in Web API and then specifically look at binding model from URI.

More after the jump.

Continue Reading


Collaborative route planner with SignalR, Knockout.js and Google Maps

Today I have published a new article over at my friends from Tech.pro. This time, we continue on the topic of SignalR & Knockout.js, and look at implementing a real-time collaborative route planner with the use of Google Maps API. Hopefully you’ll enjoy the article as much as I enjoyed writing it.

These libraries, really make a lot the development tasks feel like true magic!

As you usually, the source code is on GitHub.

Head over to tech.pro to read the tutorial!


Hosting ASP.NET Web API in LinqPad

Today I stumbled upon an interesting Stackoverflow question, where the user was asking how to go about self-hosting Web API in LinqPad.

The question has gone unanswered since December, and I’m guessing even the OP forgot about it. However, I’d like to elaborate a bit about the topic. You certainly can host Web API in LinqPad, provided you plug in a quick work around – and we actually did hit a similar issue with scriptcs.

Continue Reading