Context: Using Unity in (C#) ASP.NET MVC3 framework.
Mark Seemann suggests “In ASP.NET MVC applications it’s global.asax and a custom IControllerFactory” – (Source).
I have read other credible sources suggest to use the UnityDependencyResolver (MSDN, Adam Tuliper, Darin Dimitrov).
Darin also suggests that the two are mutually exclusive.
Which way is best practice?
MVC 3 introduced a new way to handle Dependency Injection called IDependencyResolver. In MVC prior to MVC 3, you would use IControllerFactory. In MVC 3 you would use UnityDependencyResolver.
UnityDependencyResolver is an implementation of IDependencyResovler interface. This allows Unity to be integrated into .net without having to write a custom IControllerFactory.
They are mutually exclusive, in that if you use one you would not use the other.