Closed pcoulter closed 10 years ago
Both packages need to be updated with some current changes. These will be live today and will solve this problem.
It is also important to note that WebAPI and MVC do not use the same Resolver, you can read more here http://www.webadvanced.com/blog/asp.net-mvc-4-web-api-and-structuremap
I installed both StructureMap.MVC5 and StructureMap.WebApi2 in the same project. Doing so, caused IoC.Initialize() to be called twice. As a result, it seems that my singleton was created twice, leading to same strange results later on. I wrapped the method with a static _IsInitialized variable check, which solved the problem.