tags:

views:

40

answers:

2

The error is:

An error occurred while creating a controller of type 'foo'. If the controller doesn't have a controller factory, ensure that it has a parameterless public constructor.

However, fooController has a parameterless public constructor. I'm using the default factory. As far as I know, this code was working, and nothing has changed - I did install, then uninstall, MVC2.

+1  A: 

Check that the constructor is both public and parameterless. Also check that the controller's type name ends with "Controller".

Eilon
A: 

It turns out that you get this error if there's an exception throw in the constructor. Technically, the error message is correct, but the extra information is a bit misleading.

chris