I have an OWIN app with the following startup:
public virtual void Configuration(IAppBuilder app) {
var config = new HttpConfiguration();
config.Filters.Add(new UserNotifyExceptionFilter());
ConfigureAuth(app);
app.UseNinjectMiddleware(CreateKernel);
app.UseNinjectWebApi(config);
WebApiConfig.Register(config);
ConfigureLogging(app);
config.EnableCors();
ConfigErrorHandling(config);
HelpPages(app, config);
}
It appears to load ninject, correctly, and the app runs fine for hours or days under IIS 8. Then, mysteriously, it stops working, and all [Inject]ed dependencies become null on all controllers. Nothing in my code meddles with ninject's configuration after the initial load in the startup class.
I am stumped on this one, and no one else seems to be asking about it on SO.