Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Oct 18, 2008 02:27 AM by shapper
Oct 17, 2008 07:57 PM|LINK
I am migrating my Preview 5 MVC application to MVC beta and I got an error:
An error occurred while creating a controller of type 'MyApp.Controllers.HomeController'. If the controller doesn't have a controller factory, ensure that it has a parameterless public constructor.
On code line in global.asax.cs:
Oct 17, 2008 08:46 PM|LINK
Is httpHandler a custom HTTP handler that you wrote? I don't have that line in my Global.asax.cs.
Oct 18, 2008 12:43 AM|LINK
are you using some DI frameworks with this? It seems your controller has a constructor that takes some parameters and DI cannot resolve those. (just guessing)
Oct 18, 2008 02:27 AM|LINK
I found the error. The connection string used in the DBML file was different from the connection string in Web.Config.