Open B3nCr opened 7 years ago
Hmm, now I've even managed to break the MVC controllers which were working fine before.
I added this to my Start.cs
config.DependencyResolver = new StructureMapWebApiDependencyResolver(IoC.Initialize());
StructureMapDependencyScope has started throwing exceptions in DoGetInstance
"Cannot access a disposed object. Object name: 'StructureMap Nested Container'."
Hi
I'm struggling at the moment to work out what's going on with my app.
We've recently included an owin Startup class and I believe that's what's made StructureMap stop working.
It seems like WebAPI can't create any of my controllers and I can't see StructureMap anywhere in the stack trace so that's making me think it's not registered as the controller factory or something.
What am I missing? There must be an OWIN config line that I'm missing that tells OWIN that StructureMap is my DI container and to use it to create controller instances