X

ASP.NET: How to avoid ArgumentNullException in StructureMap controller factory

I am using StructureMap as my IoC container. In my ASP.NET MVC web application I have controller factory based on StructureMap. I found interesting problem – when running my web application on development web server I get ArgumentNullException with every request to some controller action. In this posting I will describe why it is happening and how to avoid it.

ASP.NET MVC 3: Updating controller factories to RC

With ASP.NET MVC 3 RC there is change in IControllerFactory interface. This interface includes new method called GetControllerSessionBehavior(). This method returns value from SessionStateBehavior enum. ASP.NET MVC uses this method to find out how to handle session for given controller.

Free e-book: Moving to Visual Studio 2010

Those who are still using older versions of Visual Studio may find the free e-book “Moving to Microsoft Visual Studio 2010” useful when deciding if it is time to move to Visual Studio 2010 or not. The book is written by Ken Haines, Pascal Paré and Patrice Pelland who all work in Microsoft Consumer and Online Division.

How to dump object properties

I needed a quick’n’dirty way to inspect objects returned from external source. I wrote simple object properties dumping mechanism you can use to investigate unknown objects. It is really quick and really dirty.

Visual Studio: How to include missing namespaces

Some of my readers have problem with detecting correct namespaces to include in code samples. Here is how to get references in place using Visual Studio IDE. You can let Visual Studio to solve references to types that have no namespaces for them included in code file. Move cursor to unreferenced type, right click on it with mouse, select Resolve and then select correct type

ASP.NET MVC 3: Building simple image editor using WebImage helper

In my previous posting about WebImage helper I introduced how to use WebImage for different image manipulations. In this posting I will show you how to build simple online image editor using WebImage helper.

ASP.NET MVC 3: Using global action filters to find out running time of controller actions

Lately I blogged about global action filters in ASP.NET MVC 3. Yesterday I found cool article from Nick Berardi’s Coder Journal where he introduces how to use action filters to measure running time of ASP.NET MVC controllers. And here is my experiment – how to use global action filters to find out how long controller actions are running. You just need couple of lines of code.

What is Visual Studio Async?

During PDC10 Anders Hejlsberg announced Visual Studio Async CTP when speaking about new stuff in C# and VB.NET next versions. In this posting I will introduce the background of Visual Studio Async and I will provide you with links to different resources so you can get started immediately.

How to insert million numbers to table fast?

Yesterday I attended at local community evening where one of the most famous Estonian MVPs – Henn Sarv – spoke about SQL Server queries and performance. During this session we saw very cool demos and in this posting I will introduce you my favorite one – how to insert million numbers to table. (more…)

ASP.NET MVC 3 Beta: Using WebMail helper to send e-mail

This far I have blogged about WebImage and Chart helpers. Now let’s see another new helper – WebMail – that you can easily use to send e-mails. WebMail is easy to configure and extremely easy to use. In this posting I will show you simple feedback form that uses WebMail to send feedback messages.