I\'m starting a web application with MVC3 and Ninject. There is one dependency that I also need in the Global.asax file that needs to be a singleton.
I thought it sh
Can you use the HttpApplication.Appliction property?
public class MyHttpApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
this.Application["auth"] = GetAuthFromContainer();
}
protected void Application_AuthenticateRequest()
{
IUserAuthentication auth = (IUserAuthentication)this.Application["auth"];
// auth != null
}
}