I have an MVC4 application that uses Unity to resolve dependencies. One of the things that we have is the logger decorator for the Unity container - for the sole purpose of registering when a failure resolves any problem.
I find that there are a significant number of types that cannot decide that my application is NOT explicitly allowed. These types are:
IControllerFactory IControllerActivator IViewPageActivator ModelMetadataProvider ITempDataProvider IActionInvoker IAsyncActionInvoker
Thrown exceptions look like this:
The ITempDataProvider type has no constructor available.
... with his type.
These exceptions occur only when the application starts, and now we register them and continue. Thus, the application works fine even after errors have occurred.
I hate swallowing mistakes without a good reason and without understanding that trying to solve them, first of all, I have no good reason.
Questions:
1) Does anyone know who / what is trying to solve them? This is nowhere in my codebase. 2) If somewhere within this framework they are trying to be resolved, is it expected that my application will grant Unity permission for them? 3) Or is this just the expected behavior, and should I catch these exceptions?
I understand that this is not so much, but I hope someone else sees these types of errors and can point me in the right direction.
c # asp.net-mvc-4 unity-container
Silas
source share