protected void Application_Start()
{
ObjectFactory.Initialize(x =>
x.Scan(a =>
{
a.TheCallingAssembly();
a.WithDefaultConventions();
a.AddAllTypesOf<IAutoActionFilter>();
}));
RegisterRoutes(RouteTable.Routes);
ControllerFactory.GetInstance = type => ObjectFactory.GetInstance(type);
ControllerBuilder.Current.SetControllerFactory(new ControllerFactory());
}