Which event is the best for registering the types with Unity?
I wish to do this
iocContainer.RegisterType<ControllerA>();
iocContainer.RegisterType<ControllerB>();
so they could be retrieved by the ControllerFactory from the Unity Container.
My opinion was to do that in the Application_Start event, but I've been warned that I could face many problems caused by the App pool recycling (not firing the Application_start). So the alternative would be the Session_start.
Any advice?
[UPDATE]
But if I use
iocContainer.RegisterInstance<IService>(service)
what happens if the app pool recycle or IIS is resetted? Is the instance of service been recreated?