Archive for the ‘Web’ Category

Razor + Visual Studio bug: don’t paste whitespace in code

Just a quick note of a bug my wife discovered when working with some Razor code. If you have ASP.NET MVC 3 Release Candidate installed, you can trigger this. Take a spot where your view file has a C# expression (such as @View.Title), and paste some code after that expression. An example of the code […]

November 30, 2010 · Jouni Heikniemi · No Comments
Tags:  · Posted in: .NET, Web

Outputting partial elements with ASP.NET Razor

The new ASP.NET MVC 3 also ships with a totally new option for a view engine, Razor. I’ve now been using Razor in a project for couple of months, and yeah, it’s good – but not entirely without problems. Here I’ll cover one of them. Imagine a scenario where you’re outputting something that may or […]

November 17, 2010 · Jouni Heikniemi · No Comments
Tags: ,  · Posted in: .NET, Web

Keeping ASP.NET MVC action method argument names separate from the query

ASP.NET MVC does a wonderful job of automatically routing and binding your HTTP request data to the action method. But what if you don’t want to use the same argument names in your routes (for example, query strings) and your methods? There are a few typical scenarios where you might encounter this. First, if you’re […]

November 15, 2010 · Jouni Heikniemi · 11 Comments
Tags:  · Posted in: .NET, Web

New guidance: No more Silverlight for the web?

Microsoft sparked quite a controversy when Bob Muglia stated in an ZDnet interview that their “Strategy had changed” regarding Silverlight’s position, and HTML5 was the future way to go. In this post, I look at the whole debacle’s effect on future technology recommendations. While this has now been explained by Bob Muglia, Steve Ballmer and […]

November 5, 2010 · Jouni Heikniemi · 3 Comments
Tags: ,  · Posted in: .NET, Web

PDC10 keynote summary

PDC10 conference kicked off today in Seattle – but really, Microsoft wanted to define the conference as global, having hundreds of local streamwatching events around the world. Unfortunately, as many have suspected, running PDCs every year tends to wear out some of the glamour around them. Even with all the Microsoft’s development resources, they have […]

October 28, 2010 · Jouni Heikniemi · No Comments
Tags: , , , , , ,  · Posted in: .NET, Cloud, Web

Twitter and OAuth in desktop applications

If you’re into Twitter API programming, you probably know that the end of basic authentication is here. This post delves into the question of using the OAuth authentication mechanism in desktop applications. If you know the subject, this post will give you some practical advice for C# application development. If you don’t, it’ll act as […]

September 2, 2010 · Jouni Heikniemi · 10 Comments
Tags: ,  · Posted in: .NET, Web

Windows Azure CDN now priced and available!

Last November, Microsoft rolled out Windows Azure Content Delivery Network, allowing you to cache your blobs near your users. It was in free CTP for a while, but starting in July, there will be official support – and a price tag attached. In a recent post on the Windows Azure team blog, the team laid […]

June 2, 2010 · Jouni Heikniemi · 2 Comments
Tags: , ,  · Posted in: Cloud, Web

Geolocation on the web

Did you know W3C has a draft specification for Geolocation API in browsers? In practice, that means a JavaScript call could discover your location. Does that really work? And if, how? There’s this site called, which plots your position on a Google Map. It also correctly answers the question of whether Geolocation API belongs […]

May 28, 2010 · Jouni Heikniemi · No Comments
Tags: , , ,  · Posted in: Web

Unifying URIs from multiple domains with mod_rewrite

For a change, something totally non-Windows here! This web site is served at as well as There are multiple reasons for this, but until this week, it has sucked quite a bit from a search engine perspective. It no longer does. Any page has had at least two URIs. What this means is […]

May 21, 2010 · Jouni Heikniemi · 2 Comments
Tags:  · Posted in: Web

Why would you want the “Bing insanity” to stop?

Microsoft’s Bing gets frequently bashed for being a hopeless project. But should Microsoft kill it off and focus on other things? Business Insider’s Henry Blodget pushed out a blog post calling Bing “still toast”. I recommend reading the article as it provides an interesting insight into what feeds the search giants. The article also makes […]

March 30, 2010 · Jouni Heikniemi · 4 Comments
Posted in: Web