Archive for the ‘.NET’ Category

NullReferenceException from NHibernate in a WCF Service

Don’t you hate it when you get an NullReferenceException? NHibernate 2.1.2 throws one if you have an WCF Service that accesses the NHibernate context. If you get one from NHibernate.Context.WebSessionContext.GetMap(), read on… It’s really simple but easy to forget – NHibernate’s web session models requires you to have HttpContext available. That particular mentioned method calls […]

December 21, 2010 · Jouni Heikniemi · 4 Comments
Tags: , ,  · Posted in: .NET

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

SANKO meeting on ORM tools, 2010-11-24

Finnish .NET Users Group SANKO will be meeting on 24th November in Leppävaara, Espoo, Finland in order to discuss the concept and details of object-relation mapping. In case you live in the Greater Helsinki Area, check this out! The agenda is as follows (all sessions in Finnish): 13:00 – 13:15 Welcome & What’s this SANKO? […]

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

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 · 8 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 · 9 Comments
Tags: ,  · Posted in: .NET, Web

“Quadrant” scrapped, “M” refocused – Oslo soon under water?

Mary-Jo reports that her sources tell Quadrant is going to get scrapped and the M language refocused. What’s up with the previously massive Oslo codename? Both parts were key to Oslo – in fact, the most visible parts left of the original vision that once seemed to span the data modeling needs of the entire […]

August 6, 2010 · Jouni Heikniemi · No Comments
Tags: ,  · Posted in: .NET

Live Mesh dying soon – some saved by Live Sync, some not

The fact that Microsoft had Live Mesh, Live Sync and SkyDrive offerings was always confusing. Things are getting a turn for the clearer, as the Live Mesh brand gets nixed and Live Sync gains much of what Mesh used to be. But it’s not a change without losses. When installing the Live Wave 4 package, […]

June 14, 2010 · Jouni Heikniemi · One Comment
Tags: ,  · Posted in: .NET, General