Trying to figure out a way to fix a startup.cs vs. container registration race condition.
I added Hangfire to my project so it's running in Startup.cs (via OWIN) with something like this:
Then I had a background job that needed an interface to be injected into it (we use Autofac) and in our Global.asax.cs file we call a static class to build our container where we setup things to use Autofac:
var builder = new ContainerBuilder();
// bunch of RegisterXXX methods
var container = builder.Build()
Trying to figure out how to do these in the right order? What have others done where you're doing both an OWIN startup and a container startup?