Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class StructureMapControllerFactory : DefaultControllerFactory
- {
- protected override IController GetControllerInstance(Type controllerType)
- {
- if (controllerType == null)
- throw new ArgumentNullException("controllerType");
- return ObjectFactory.GetInstance(controllerType) as Controller;
- }
- }
- protected void Application_Start()
- {
- RegisterRoutes(RouteTable.Routes);
- Bootstrapper.ConfigureStructureMap();
- ControllerBuilder.Current.SetControllerFactory(new StructureMapControllerFactory());
- }
- if(controllerType == null)
- return base.GetControllerInstance(controllerType)
- background: url(img/logo.gif);
- routes.IgnoreRoute("{Content}/{*pathInfo}");
- routes.IgnoreRoute("{*favicon}", new {favicon=@"(.*/)?favicon.ico(/.*)?"})
Add Comment
Please, Sign In to add comment