The service layer is seperated into command and query side and each side has their handlers.
The following configuration is used
// EF context
_container.RegisterPerWcfOperation<MyDbContext, MyDbContext>();
_container.RegisterManyForOpenGeneric(typeof(IHandler<>),
ApplicationAssemblies);
// many more regs but nothing special
SimpleInjectorServiceHostFactory.SetContainer(_container);
and the needed markup settings:
Factory="SimpleInjector.Integration.Wcf.SimpleInjectorServiceHostFactory, SimpleInjector.Integration.Wcf"
throws the following exception:
WCF scopes can not be nested.
I think the error occurs in
internal WcfOperationScope BeginScope()
of the WcfOperationScopeManager
implementation.
Some background informations:
- WinForm application
- execution of the QueryClient is done with a backgroundworker
- I'm using Simple Injector version 2.2.3
- Global.asax which builds the container
- hosted in IIS
- each .svc has its markup set to use
SimpleInjectorFactory
wsHttpBinding
with certificate and customUserNamePasswordValidator
- each endpoint configuration has all needed values set to 2147483647.
The error occurs when I execute two loading request fast consecutively so the first is not finished and the second one occurs.