{"action":"opened","issue":{"url":"https://api.github.com/repos/rasmus/EventFlow/issues/218","repository_url":"https://api.github.com/repos/rasmus/EventFlow","labels_url":"https://api.github.com/repos/rasmus/EventFlow/issues/218/labels{/name}","comments_url":"https://api.github.com/repos/rasmus/EventFlow/issues/218/comments","events_url":"https://api.github.com/repos/rasmus/EventFlow/issues/218/events","html_url":"https://github.com/rasmus/EventFlow/issues/218","id":148105874,"number":218,"title":"Hangfire JobScheduler and Autofac Activator","user":{"login":"oliveiracdz","id":7572184,"avatar_url":"https://avatars.githubusercontent.com/u/7572184?v=3","gravatar_id":"","url":"https://api.github.com/users/oliveiracdz","html_url":"https://github.com/oliveiracdz","followers_url":"https://api.github.com/users/oliveiracdz/followers","following_url":"https://api.github.com/users/oliveiracdz/following{/other_user}","gists_url":"https://api.github.com/users/oliveiracdz/gists{/gist_id}","starred_url":"https://api.github.com/users/oliveiracdz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliveiracdz/subscriptions","organizations_url":"https://api.github.com/users/oliveiracdz/orgs","repos_url":"https://api.github.com/users/oliveiracdz/repos","events_url":"https://api.github.com/users/oliveiracdz/events{/privacy}","received_events_url":"https://api.github.com/users/oliveiracdz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-13T15:53:40Z","updated_at":"2016-04-13T15:53:40Z","closed_at":null,"body":"I'm using Autofac as IoC container of EventFlow.\r\nWhen i've tried to configure HangFire as JobScheduler, I ran into this issue.\r\nI need the container to register the Activator for HangFire recurring jobs. But the extension method `UseAutofacContainerBuilder` needs to have HangFire already configured.\r\nMaybe i'm missing something on the order of things, can you help me? \r\n\r\n```\r\n        public void Configuration(IAppBuilder app)\r\n        {\r\n            var builder = new ContainerBuilder();\r\n\r\n            // Container registrations...\r\n\r\n            var container = EventFlowOptions.New\r\n                .UseAutofacContainerBuilder(builder)\r\n                .UseHangfireJobScheduler() // This line throws, cause I did not initialized the HangFire yet.\r\n                .ConfigEventStore()\r\n                // More configs...\r\n                .CreateContainer();\r\n\r\n            // I need the container here to configure HangFire activator for recurring jobs.\r\n            // so I can not register HangFire before.\r\n            GlobalConfiguration.Configuration.UseAutofacActivator(container); \r\n\r\n            app.UseHangfireServer();\r\n            app.UseAutofacMiddleware(container);\r\n        }\r\n```\r\n\r\nThe exception:\r\n> An exception was thrown while executing a resolve operation. See the InnerException for details. ---> JobStorage.Current property value has not been initialized. You must set it before using Hangfire Client or Server API. (See inner exception for details.), An exception was thrown while executing a resolve operation. See the InnerException for details. ---> JobStorage.Current property value has not been initialized. You must set it before using Hangfire Client or Server API. (See inner exception for details.), An exception was thrown while executing a resolve operation. See the InnerException for details. ---> JobStorage.Current property value has not been initialized. You must set it before using Hangfire Client or Server API. (See inner exception for details.), An exception was thrown while executing a resolve operation. See the InnerException for details. ---> JobStorage.Current property value has not been initialized. You must set it before using Hangfire Client or Server API. (See inner exception for details.)"}}