Posted on: 9/21/2012 11:52:27 PM | Views : 249

I have a very strange problem. In my MVC 4 application I have this code to initialize StructureMap :
public static class IoC { public static IContainer Initialize() { ObjectFactory.Initialize(x => { x.Scan(scan => { scan.TheCallingAssembly(); scan.WithDefaultConventions(); }); x.For<IRestHttpClient>().Use<AtlamHttpClient>().Ctor<string>().Is(Settings.AtlamServicesURL); }); ObjectFactory.AssertConfigurationIsValid(); return ObjectFactory.Container; } that works as expected. However, I also have a .NET 4.5 Web forms application with the same basic initialization code:
public static class IoC { public static IContainer Configure() { ObjectFactory.Initialize(x ...

Go to the complete details ...