Nov 4, 2010 at 12:39 AM
Edited Nov 4, 2010 at 4:50 AM
Are you sure you entered the correct type name for the RegisterControllerFactory? In addition, the constructor injection for RegisterControllerFactory defines a parameter with dependencyType equal to IControllerFactory but there's no configured
registration for this type. You should map the IControllerFactory to a specific implementation.
I also have some suggestions:
I noticed you defined aliases Singleton and Transient. You can remove these aliases and make use of Unity 2.0's pre-defined aliases
singleton and transient (lower-case).
You can also use this method of loading the container from the configuration file instead of using the UnityConfigurationSection.Configure API:
IUnityContainer container = new UnityContainer();
Make sure to add a using statement for Microsoft.Practices.Unity.Configuration namespace.
Global Technologies and Solutions