views:

155

answers:

1

Hi,

Has anyone been able to get AutofacControllerFactory working in applications where the controllers are split into Areas?

Looks like it is not supported out of the box in the current version.

Thanks

A: 

I'm afraid I can't offer a solution for AutoFac, but perhaps you could consider using Ninject (Github Download) instead? It does work with areas if you grab the latest Ninject MVC extension build from Github.

At the time of this posting there is a small bug in the MVC extension which sometimes causes types to get double-registered and results in controller resolution errors. The quick fix is to simply rebuild the application pool in IIS. Having spoken with the developer recently, it sounds like they've gotten the problem tracked down and it's just a matter of time before they update the sources.

Nathan Taylor
Thanks, but I'm pretty happy with AutoFac, and am using other AutoFac features, so don't want to change unless forced to.
UpTheCreek
Alright, sorry I couldn't be more helpful! Good luck. :)
Nathan Taylor