public static void Configure(HttpConfiguration httpConfiguration, IIocContainer container) { httpConfiguration.MapHttpAttributeRoutes(); if (container != null) { httpConfiguration.Using(container) .AddExceptionLogger() .AddIocBasedControllerActivator(); httpConfiguration.Filters.Add(new ForwardedByFilter()); container.UseSingleton<CachedProductCatalog>(); container.For<ICartIdProvider>().Use<CardIdProvider>(); } httpConfiguration.EnsureInitialized(); }