views:

38

answers:

0

I've got interface IImportManager with SessionImportManager that implements this interface. SessionImportManager's constructor must be passed an instance of HttpSessionStateBase in order to work properly.

How should I register IImportManager with Unity?

I've tried

_unityContainer.RegisterInstance<IImportManager>(new SessionImportManager(new HttpSessionStateWrapper(Session)), new ContainerControlledLifetimeManager())

but it says that Session is unavailable at this point (in InitializeController)