Sep 30, 2012 at 7:18 PM
Edited Sep 30, 2012 at 7:20 PM
I've ended up writing an admin module for this and as far as creating tenants it went rather smooth.
Now when I try to set up the tenants I get this nasty error:
[ObjectDisposedException: Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it has already been disposed.]
Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +59
For setting up each tenant I use the following code:
for (int i = 0; i < viewModel.Count; i++)
using (var environment = _orchardHost.CreateStandaloneEnvironment(tenant))
ISetupService setupService = environment.Resolve<ISetupService>();
using (var trans = new TransactionScope(TransactionScopeOption.Suppress))
I've noticed that in Local DTC all of my transaction are being aborted.
Could someone please advise me on this ?