Earlier I asked this question. The answer to which resulted into another question like thou seeth before thee.
My problem is, that I ha
The .InRequestScope()
bit is causing some of your objects to be Disposed (see Cache and Collect).
You need to make this (scoping by request) not happen in your provisioning of your provider's dependencies.
One way to achieve that is by having two bindings - one for the request processing branch and one for the global context, i.e., adding a When
... which uses the context.ParentContext
... chain to control whether it's InRequestScope()
or not
Sadly I don't have time to give a full answer now and the relevant docs are out of sync with the code at present.