Beispiel #1
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.IgnoreRoute("favicon.ico");

            routes.MapRoute(
                name: "LogOut",
                url: "logout",
                defaults: new { controller = "Auth", action = "LogOut", id = UrlParameter.Optional }
            );

            routes.MapRoute(
                name: "EnterCardNumber",
                url: "cardnumber",
                defaults: new { controller = "Auth", action = "CardNumber", id = UrlParameter.Optional }
            );

            routes.MapRoute(
                name: "EnterCardPin",
                url: "pin",
                defaults: new { controller = "Auth", action = "CardPin", id = UrlParameter.Optional }
            );
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Card", action = "Index", id = UrlParameter.Optional }
            );
        }
Beispiel #2
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            // Routes to ignore
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("favicon.ico");
            routes.IgnoreRoute("elmah.axd");

            #region Routes to Map

            routes.MapRoute(
                "UserId", // Route name
                "Users/{action}/{id}", // URL with parameters
                new { controller = "User", action = "List", id = UrlParameter.Optional }// Parameter defaults
            );

            routes.MapRoute("User", "Users/{action}", new { controller = "User", action = "List" });
            routes.MapRoute("Claim_Default", "Claim/{ClaimID}/{action}", new { controller = "Claim", ClaimID = -1, action = "Manage" });// (default action? because we dpn't want to hide it)
            routes.MapRoute("Role", "Roles/{action}", new { controller = "Role", action = "Manage" });
            routes.MapRoute("Master_Default", "Master/Manage/{masterTbl}", new { controller = "Master", action = "Manage"});
            routes.MapRoute("Home", "Dashboard/{action}", new { controller = "Dashboard", action = "List" });
            routes.MapRoute("Activity", "Activity/{action}", new { controller = "Activity", action = "Log" });
            routes.MapRoute("Master_Manage", "Manage/{masterTbl}", new { controller = "Master", action = "Manage" });
            //routes.MapRoute("Reporting", "Reports/{action}/{reportStr}", new { controller = "Report", action = "Activity" });

            routes.MapRoute("Default","{controller}/{action}/{from}",new { controller = "Common", action = "Login", from = UrlParameter.Optional });
            #endregion
        }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("{resource}.ico/{*pathInfo}");
            routes.IgnoreRoute("Scripts/{resource}");

            routes.MapRoute(
                "Search",
                "Search/{*PageId}",
                new { controller = "Page", action = "Search" }, // Parameter defaults
                new { pageId = @"^(.*)?$", httpMethod = new HttpMethodConstraint("POST") } // Parameter constraints
            );

            routes.MapRoute(
                "PreviewPage",
                "{*PageId}",
                new { controller = "Page", action = "PreviewPage" }, // Parameter defaults
                new { httpMethod = new HttpMethodConstraint("POST") } // Parameter constraints
            );

            routes.MapRoute(
                "TridionPage",
                "{*PageId}",
                new { controller = "Page", action = "Page" }, // Parameter defaults
                new { pageId = @"^(.*)?$" } // Parameter constraints
            );

            routes.MapRoute(
                "Default",
                "{controller}/{action}");
        }
Beispiel #4
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("scripts/{list}.aspx");

            routes.MapRoutes<Routes>();
        }
Beispiel #5
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("scripts/{*pathInfo}");
            routes.IgnoreRoute("content/{*pathInfo}");

            routes.MapRoute(
                "ServerJS", // Route name
                "ServerJS/{action}/{key}", // URL with parameters
                new { controller = "ServerJS", action = "", key = UrlParameter.Optional }
            );

            routes.MapRoute(
                "Installer", // Route name
                "Installer/{action}/{key}", // URL with parameters
                new { controller = "Installer", action = "", key = UrlParameter.Optional }
            );

            //the route controller is the "catch all"
            routes.MapRoute(
                "Route", // Route name
                "{*name}", // URL with parameters
                new { controller = "Route", action = "Index" } // Parameter defaults
            );

            if (ConfigurationManager.AppSettings.GetSetting("EnableRouteDebug", false))
                RouteDebug.RouteDebugger.RewriteRoutesForTesting(RouteTable.Routes);
        }
Beispiel #6
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });

            routes.MapRouteLowercase(
                "Default",
                "", // Only matches the empty URL (i.e. ~/)
                new { controller = "Search", action = "Index" }
            );

            routes.MapRouteLowercase(
                "Queue",
                "Queue/",
                new { controller = "Queue", action = "Index" }
            );

            //routes.MapRouteLowercase("Report", "{controller}/Report/{action}");

            routes.MapRouteLowercase(
                "SlugsAfterId",
                "{controller}/{action}/{id}/{slug}",
                new { action = "Edit", slug = "" }
            );

            routes.MapRouteLowercase(null, "{controller}/{action}");
        }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{*favicon}", new {favicon = @"(.*/)?favicon.ico(/.*)?"});
            routes.IgnoreRoute("{*nakedobjects}", new {nakedobjects = @"(.*/)?nakedobjects.ico(/.*)?"});

            RunMvc.RegisterGenericRoutes(routes);
        }
Beispiel #8
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("{resource}.ashx/{*pathInfo}");

            routes.MapRoute(
                 name: "404",
                 url: "404",
                 defaults: new { controller = "Error", action = "Page404", id = UrlParameter.Optional }
            );

            routes.MapRoute(
                name: "Error",
                url: "Error/{id}",
                defaults: new { controller = "Error", action = "Index", id = UrlParameter.Optional }
            );

            routes.MapRoute(
                name: "Pages",
                url: "Manager.html",
                defaults: new { controller = "Pages", action = "Index", id = UrlParameter.Optional }
            );

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Manager", action = "Index", id = UrlParameter.Optional }
            );
        }
        public static void RegisterRoutes(RouteCollection routes, IDependencyInjectionContainer container)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            // TODO: Make custom FavIcons per tenant
            routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });

            routes.MapRoute(
                name: "Error - 404",
                url: "not-found",
                defaults: new { controller = "System", action = "Status404" }
                );

            routes.MapRoute(
                name: "Error - 500",
                url: "server-error",
                defaults: new { controller = "System", action = "Status500" }
                );

            routes.Add(container.Resolve<LowercaseRedirectRoute>());
            routes.Add(container.Resolve<TrailingSlashRedirectRoute>());
            routes.Add(container.Resolve<DefaultLocaleRedirectRoute>());
            routes.Add("Page", container.Resolve<PageRoute>());
            routes.Add("Product", container.Resolve<ProductRoute>());

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
Beispiel #10
0
		public static void RegisterRoutes(RouteCollection routes)
		{
			routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
			routes.IgnoreRoute("favicon.ico");
			routes.IgnoreRoute("{composite}/{*pathInfo}");
			routes.MapRoute("Default", "{controller}/{action}", new { controller = "Home", action = "Index" });
		}
 public static void RegisterRoutes(RouteCollection routes)
 {
     routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
     routes.IgnoreRoute("Content");
     routes.MapRoute(
     name: "danhmuc", // Route name
        url: "danh-muc/{id}/{slug}", // URL with parameters
        defaults: new { controller = "SanPham", action = "SanPhamTheoDanhMuc", id = UrlParameter.Optional, slug = "" } // Parameter defaults
        );
     routes.MapRoute(
        name: "content", // Route name
       url: "content", // URL with parameters
       defaults: new { controller = "Content", action = "Index"} // Parameter defaults
       );
     routes.MapRoute(
        name: "thuonghieu", // Route name
       url: "thuong-hieu/{id}/", // URL with parameters
       defaults: new { controller = "SanPham", action = "SanPhamTheoThuongHieu", id = UrlParameter.Optional } // Parameter defaults
       );
     routes.MapRoute(
     name: "sanpham", // Route name
        url: "san-pham/{id}/{slug}", // URL with parameters
        defaults: new { controller = "SanPham", action = "ChiTiet", id = UrlParameter.Optional, slug = "" } // Parameter defaults
        );
     routes.MapRoute(
         name: "Default",
         url: "{controller}/{action}/{id}",
         defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
     );
 }
Beispiel #12
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("{folder}", new { folder = "Script" });
            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                new { controller = new EventRouteContraint() },
                new[] { typeof(HomeController).Namespace });

            routes.MapRoute(
                "Events",
                "events/{action}",
                new {controller = "events", action = "index", area = "", eventName = ""},
                new {action = new EventActionRouteContraint() },
                new[] {typeof (HomeController).Namespace});

            routes.MapRoute(
                "EventAction",
                "events/{eventName}/{action}",
                new {controller = "events", action = "event", area = ""},
                new[] {typeof (HomeController).Namespace});

            routes.MapRoute(
                "Event",
                "events/{eventName}",
                new {controller = "events", action = "event", area = "", eventName = ""},
                new[] {typeof (HomeController).Namespace});
        }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("{*favicon}", new {favicon = @"(.*/)?favicon.ico(/.*)?"});

            routes.MapRoute
                (
                    "ServiceEntryPoint",
                    "Service/{service}/{structureId}/{containerId}/{workspaceTypeName}",
                    new {controller = "Home", action = "Index"}
                );

            routes.MapRoute
                (
                    "Service",
                    "Service/{service}/{controller}/{action}",
                    new {service = "", controller = "Home", action = "Index"}
                );

            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new {controller = "Home", action = "Index", id = UrlParameter.Optional} // Parameter defaults
                );
        }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("{*allappleicon}", new { allappleicon = @"apple-touch-icon-.*\.png(/.*)?" });
            routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });
            routes.IgnoreRoute("{page}.html");

            routes.MapRoute(
                "illos",
                "illos",
                new { controller = "Portfolio", action = "Illos" });

            routes.MapRoute(
                "piccies",
                "piccies",
                new { controller = "Portfolio", action = "Piccies" });

            routes.MapRoute(
                "detail",
                "detail/{id}",
                new { controller = "Portfolio", action = "Detail", id = UrlParameter.Optional });

            routes.MapRoute(
                "Default",
                "{controller}/{action}/{id}",
                new { controller = "Portfolio", action = "Index", id = UrlParameter.Optional });
        }
Beispiel #15
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{*allcss}", new {allcss = @".*\.css(/.*)?"});
            routes.IgnoreRoute("{*alljs}", new {allcss = @".*\.js(/.*)?"});
            routes.IgnoreRoute("{*allaspx}", new {allaspx = @".*\.aspx(/.*)?"});
            routes.IgnoreRoute("{*favicon}", new {favicon = @"(.*/)?favicon.ico(/.*)?"});
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute("Sitemap", "sitemap.xml", new {controller = "Content", action = "SiteMap"});
            routes.MapRoute("Robots", "robots.txt", new {controller = "Content", action = "Robots"});

            // include all plugin routes
            foreach (var registry in ObjectFactory.Model.GetAllPossible<IRouteRegistry>())
            {
                registry.RegisterRoutes(routes);
            }

            routes.MapRoute("Admin", "admin", new {controller = "Admin", action = "SignIn"});
            routes.MapRoute("AdminPanel", "admin-panel/{pageId}", new {controller = "Admin", action = "Panel"});
            routes.MapRoute("SignOut", "signout", new {controller = "Admin", action = "SignOut"});

            routes.MapEyePatchRoute(
                "EyePatch", // Route name
                "{controller}/{action}", // URL with parameters
                new {controller = "Admin", action = "Install"}, // Parameter defaults
                null, null
                );

            routes.MapRoute("Default", "{controller}/{action}/{id}", new {id = UrlParameter.Optional});
        }
        public static void Register(RouteCollection routes)
        {
            // Turns off the unnecessary file exists check
            routes.RouteExistingFiles = true;

            // Ignore API pathways
            routes.IgnoreRoute("api/{*pathInfo}");

            // Ignore axd files such as assest, image, sitemap etc
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            //Exclude favicon (google toolbar request gif file as fav icon)
            routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.([iI][cC][oO]|[gG][iI][fF])(/.*)?" });

            // Ignore the content directories which contains images, scripts, & css
            routes.IgnoreRoute("Content/{*pathInfo}");
            routes.IgnoreRoute("Scripts/{*pathInfo}");

            routes.MapRoute("Search", "search", new { controller = "Search", action = "Index" });

            routes.MapRoute("Category", "{category}", new { controller = "Home", action = "Category" });
            routes.MapRoute("Entry", "{category}/{title}-{id}", new { controller = "Home", action = "Entry" }, new { id = @"\d+" });
            routes.MapRoute("Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = UrlParameter.Optional });

            // Ignore status, html, xml files.
            routes.IgnoreRoute("{file}.ashx");
            routes.IgnoreRoute("{file}.txt");
            routes.IgnoreRoute("{file}.htm");
            routes.IgnoreRoute("{file}.html");
            routes.IgnoreRoute("{file}.xml");
        }
Beispiel #17
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.IgnoreRoute("favicon.ico");

            routes.MapRoute(
                "Archives",
                "Archives",
                new { controller = "Page", action = "Index", }
            );

            routes.MapRoute(
                "Feed",
                "Feed",
                new { controller = "Wiki", action = "Feed", }
            );

            routes.MapRoute(
                "Wiki",
                "{title}",
                new { controller = "Wiki", action = "Details", title = "Home" }
            );

            routes.MapRoute(
                "Default",
                "{controller}/{action}/{id}",
                new { controller = "Page", action = "Index", id = UrlParameter.Optional }
            );
        }
Beispiel #18
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("{CustomEndpoint}.axd");
            routes.IgnoreRoute("Content/{*AnyFile}");
            routes.MapRoute("Favicon", "favicon.ico", new { controller = "Home", action = "Favicon" });

            routes.MapRoute(
                "ContentRoutingForTrailingSlashUrls",
                "Blog/Post/{slug}/PostContent/{contentName}",
                new { controller = "Blog", action = "PostContent" });

            routes.MapRoute(
                "ContentRoutingForNoTrailingSlash",
                "Blog/Post/PostContent/{contentName}",
                new { controller = "Blog", action = "PostContentInferSlug" });

            routes.MapRoute(
                "TagRouting",
                "Blog/Tag/{tag}/{page}",
                new { controller = "Blog", action = "Tag", page = UrlParameter.Optional });

            routes.MapRoute(
                "ArchiveRouting",
                "Blog/Archive/{year}/{month}",
                new { controller = "Blog", action = "Archive" });

            routes.MapRoute(
                "Usual",
                "{controller}/{action}/{id}",
                new { controller = "Home", action = "ToBlog", id = UrlParameter.Optional });

            routes.MapRoute("NotFound-Catch-All", "{*Url}", new { controller = "Error", action = "NotFound" });
        }
Beispiel #19
0
        public static void Register(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("favicon.ico");

            routes.MapRoute("InstallerRoute", "install", new { controller = "Install", action = "Setup" });
            routes.MapRoute("Task Execution", TaskExecutionController.ExecutePendingTasksURL,
                new { controller = "TaskExecution", action = "Execute" });
            routes.MapRoute("Sitemap", "sitemap.xml", new { controller = "SEO", action = "Sitemap" });
            routes.MapRoute("robots.txt", "robots.txt", new { controller = "SEO", action = "Robots" });
            routes.MapRoute("ckeditor Config", "Areas/Admin/Content/Editors/ckeditor/config.js",
                new { controller = "CKEditor", action = "Config" });

            routes.MapRoute("Logout", "logout", new { controller = "Logout", action = "Logout" },
                new[] { typeof(LogoutController).Namespace });

            routes.MapRoute("zones", "render-widget", new { controller = "Widget", action = "Show" },
                new[] { typeof(WidgetController).Namespace });

            routes.MapRoute("ajax content save", "admintools/savebodycontent",
                new { controller = "AdminTools", action = "SaveBodyContent" });

            routes.MapRoute("form save", "save-form/{id}", new { controller = "Form", action = "Save" },
                new[] { typeof(FormController).Namespace });

            routes.Add(new Route("{*data}", new RouteValueDictionary(), new RouteValueDictionary(),
                new MrCMSRouteHandler()));
        }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("{resource}.ashx/{*pathInfo}");

            routes.MapRoute(
                "ContentPaginated", // Route name
                "{page}/{*path}", // URL with parameters
                new { controller = "Content", action = "Index" }, // Parameter defaults
                new
                {
                    path = new DocumentPathConstraint(DependencyResolver.Current.GetService<IContentService>()),
                    page = @"\d*"
                },
                new string[] { "NCL.Web.Controllers" }
            );

            routes.MapRoute(
                "Content", // Route name
                "{*path}", // URL with parameters
                new { controller = "Content", action = "Index" }, // Parameter defaults
                new {
                    path = new DocumentPathConstraint(DependencyResolver.Current.GetService<IContentService>()),
                },
                new string[] { "NCL.Web.Controllers" }
            );

            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional }, // Parameter defaults
                new string[] { "NCL.Web.Controllers" }
            );
        }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("favicon.ico");

            routes.MapRoute(
                "Default", // Route name
                "", // URL with parameters
                new { controller = "Shortener", action = "ShortenUrl", id = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "Review", // Route name
                ".review/{id}", // URL with parameters
                new { controller = "Shortener", action = "ReviewUlr", id = UrlParameter.Optional } // Parameter defaults
            );


            routes.MapRoute(
                "Redirect", // Route name
                "{encodedId}", // URL with parameters
                new { controller = "Shortener", action = "RedirectUrl", id = UrlParameter.Optional } // Parameter defaults
            );

        }
Beispiel #22
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");

            routes.MapRoute(
                "Index",
                "{controller}/{id}",
                new { action = "Index" },
                new { Id = @"\d+" }
            );
            routes.MapRoute(
                "List",
                "{controller}/List/{pageindex}/{type}",
                new { action = "List", pageindex = 1, type = UrlParameter.Optional }
            );
            routes.MapRoute(
                "CIA_list_active",
                "{controller}/{id}/{action}/{pageindex}/{itemid}",
                new { pageindex = 1, itemid = UrlParameter.Optional },
                new { Id = @"\d+" }
            );
            routes.MapRoute(
                "Default",
                "{controller}/{action}",
                new { controller = "Seat", action = "Use" }
            );
        }
Beispiel #23
0
 public static void RegisterRoutes(RouteCollection routes)
 {
     routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
     routes.IgnoreRoute("Logs/elmah.axd/{*pathInfo}");
     routes.MapRoute("Default", "{controller}/{action}/{id}", new { controller = "Cribs", action = "Index", id = UrlParameter.Optional }
     );
 }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("*.ico");

            routes.MapRoute(
                "Customer", // Route name
                "Customer/{action}/{customerCode}", // URL with parameters
                new { controller = "Customer", action = "Details" } // Parameter defaults
                //new { customerCode = @"[1-9a-zA-Z]+" }
                );

            routes.MapRoute(
                "Paged", // Route name
                "{controller}/{action}/{page}/{pageSize}", // URL with parameters
                new { controller = "Home", action = "Index" }, // Parameter defaults
                new { page = @"\d+", pageSize = @"\d+" }
                );

            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

        }
Beispiel #25
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("*.html|js|css|gif|jpg|jpeg|png|swf|ico");

            routes.MapRoute(
                "Error - 404",
                "NotFound",
                new {controller = "Error", action = "NotFound"}
                );

            routes.MapRoute(
                "Error - 500",
                "ServerError",
                new {controller = "Error", action = "ServerError"}
                );

            routes.MapRoute(
                "About",
                "Home/About",
                new { controller = "Home", action = "about", id = 1 });

            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new {controller = "Home", action = "Index", id = UrlParameter.Optional} // Parameter defaults
                );
        }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("elmah.axd");

            routes.MapMvcAttributeRoutes();
        }
Beispiel #27
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("favicon.ico");

            routes.MapRoute(
                "LogOn", // Route name
                "logon", // URL with parameters
                new { controller = "Account", action = "LogOn" } // Parameter defaults
            );

            routes.MapRoute(
                "LogIn", // Route name
                "login", // URL with parameters
                new { controller = "Account", action = "LogOn" } // Parameter defaults
            );

            routes.MapRoute(
                "Content", // Route name
                "{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

        }
Beispiel #28
0
        private static void RegisterNakedObjectsRoutes(RouteCollection routes) {
            routes.IgnoreRoute("{*favicon}", new {favicon = @"(.*/)?favicon.ico(/.*)?"});
            routes.IgnoreRoute("{*nakedobjects}", new {nakedobjects = @"(.*/)?nakedobjects.ico(/.*)?"});

            RestConfig.RegisterRestfulObjectsRoutes(routes); // must be rest first 
            RunMvc.RegisterGenericRoutes(routes);
        }
Beispiel #29
0
 public static void RegisterRoutes(RouteCollection routes)
 {
     routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
     routes.IgnoreRoute("Content/{*pathInfo}");
     routes.IgnoreRoute("Scripts/{*pathInfo}");
     //routes.MapRoute(
     //    "Default", // Route name
     //    "{controller}/{action}/{id}", // URL with parameters
     //    new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
     //);
     routes.MapRoute("Home","", new { controller = "Home", action = "Index" });
     routes.MapRoute("FBLogin","Facebooklogin", new { controller = "FacebookLogin", action = "Index" });
     routes.MapRoute("Account","Account/{action}",new { controller = "Account", Action = "Index" });
     routes.MapRoute("Galleries", "Galleries", new { controller = "Galleries", Action = "Index" });
     routes.MapRoute("GalleryView", "Galleries/{id}", new { controller = "Galleries", Action = "View", id = UrlParameter.Optional });
     routes.MapRoute("Events", "Events", new { controller = "Events", Action = "Index" });
     routes.MapRoute("EventView", "Events/{id}", new { controller = "Events", Action = "View", id = UrlParameter.Optional });
     routes.MapRoute("EventLineup", "Events/{id}/Lineup", new { controller = "Events", Action = "Lineup", id = UrlParameter.Optional });
     routes.MapRoute("EventTickets", "Events/{id}/Tickets", new { controller = "Events", Action = "Tickets", id = UrlParameter.Optional });
     routes.MapRoute("BookingStage1", "Bookings/{eventName}/{ticketID}/CustomerAccount", new { controller = "Booking", Action = "CustomerAccount", eventName = UrlParameter.Optional, ticketID = UrlParameter.Optional });
     routes.MapRoute("BookingLogin", "Bookings/{eventName}/{ticketID}/AccountLogin", new { controller = "Booking", Action = "AccountLogin", eventName = UrlParameter.Optional, ticketID = UrlParameter.Optional });
     routes.MapRoute("ReservationSummary", "Bookings/ReservationSummary/{id}", new { controller = "Booking", Action = "ReservationSummary",id = UrlParameter.Optional, bookingID = UrlParameter.Optional });
     routes.MapRoute("MakePayment", "Bookings/MakePayment/{id}", new { controller = "Booking", Action = "MakePayment", id = UrlParameter.Optional, bookingID = UrlParameter.Optional });
     routes.MapRoute("PaymentResult", "Payments/PaymentResult", new { controller = "Payments", Action = "PaymentResult" });
     routes.MapRoute("SoldOut", "Bookings/SoldOut", new { controller = "Booking", Action = "SoldOut" });
     routes.MapRoute("ArtistBio", "Artists/Bio/{id}", new { controller = "Artists", Action = "Bio", id = UrlParameter.Optional});
     routes.MapRoute("Page", "{*slug}", new { controller = "Page", action = "ChoosePage" });
 }
Beispiel #30
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("Content/*");
            routes.IgnoreRoute("{resource}.smh/{*pathInfo}");

            routes.MapRouteLowercase(
                "NotFound", // Route name
                "NotFound", // URL with parameters
                new { controller = "Home", action = "NotFound" } // Parameter defaults
            );

            routes.MapRouteLowercase(
                "Forbidden", // Route name
                "Forbidden", // URL with parameters
                new { controller = "Home", action = "Forbidden" } // Parameter defaults
            );

            routes.MapRouteLowercase(
                "BadRequest", // Route name
                "BadRequest", // URL with parameters
                new { controller = "Home", action = "BadRequest" } // Parameter defaults
            );

            routes.MapRouteLowercase(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );
        }
Beispiel #31
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                "Category",
                "Products/Category/{category}",
                new { controller = "Products", action = "Category", category = UrlParameter.Optional }
                );

            routes.MapRoute(
                "CategorySearch",
                "Products/CategorySearch/{category}",
                new { controller = "Products", action = "CategorySearch", category = UrlParameter.Optional }
                );

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Products", action = "Index", id = UrlParameter.Optional }
                );
        }
Beispiel #32
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );

            routes.MapRoute(
                name: "Default1",
                url: "{controller}/{action}/{type}/{value}",
                defaults: new { controller = "Home", action = "Index" }
                );

            routes.MapRoute(
                name: "Default2",
                url: "{controller}/{action}/{region}/{country}/{city}/{office}/{graphType}/{Period}/{StartDate}/{EndDate}",
                defaults: new { controller = "Home", action = "Index" }
                );
        }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Default29",
                url: "{controller}",
                defaults: new {controller = "Songs", action = "Index"}
            );
            
            routes.MapRoute(
                name: "Route2",
                url:"{controller}/{action}",
                defaults: new { controller = "Songs", action = "Square", id = 23}
            );

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            //routes.MapRoute(
            //    name: "ExistingCustomerDashboard",
            //    url: "Dashboard/{id}",
            //    defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            //);

            //routes.MapRoute(
            //    name: "Results",
            //    url: "Results/{id}",
            //    defaults: new { controller = "Results", action = "Index", id = UrlParameter.Optional }
            //);

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );
        }
Beispiel #35
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");


            routes.MapMvcAttributeRoutes();


            //   routes.MapRoute(
            //       "MoviesByReleaseDate",
            //       "movies/released/{year}/{month}",
            //       new { controller = "Movies", action = "ByReleaseDate" },
            //       new { year = @"2015|2016|2017", month = @"\d{2}"}
            //   );


            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );
        }
Beispiel #36
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Logout",
                url: "logout",
                defaults: new { controller = "Home", action = "Logout" }
                );

            routes.MapRoute(
                name: "Private",
                url: "private",
                defaults: new { controller = "Home", action = "Private" }
                );

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );
        }
Beispiel #37
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "ComponentDetails",
                url: "ComponentDetails/{componentId}",
                defaults: new { controller = "Home", action = "ComponentDetails" }
                );

            routes.MapRoute(
                name: "ComponentDetailsAPI",
                url: "api/Summary/{componentId}",
                defaults: new { controller = "Summary", action = "Get" }
                );

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );
        }
Beispiel #38
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            //login path
            routes.MapRoute(
                name: "Login",
                url: "login",
                defaults: new { controller = "Admin", action = "Login" }
                );



            //reset password path
            routes.MapRoute(
                name: "reset-password",
                url: "resetpassword",
                defaults: new { controller = "User", action = "resetpassword" }
                );
            routes.MapRoute(
                name: "cotizar",
                url: "cotizar",
                defaults: new { controller = "User", action = "Cotizacion" }
                );

            //sign up path
            routes.MapRoute(
                name: "Register",
                url: "signup",
                defaults: new { controller = "User", action = "SignUp" }
                );


            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );
        }
Beispiel #39
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Login",
                url: "login",
                defaults: new { controller = "Auth", action = "Login" }
                );

            routes.MapRoute(
                name: "Register",
                url: "register",
                defaults: new { controller = "Auth", action = "Register" }
                );

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Bots", action = "Index", id = UrlParameter.Optional }
                );
        }
Beispiel #40
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                null,
                "",
                new { controller = "Home", action = "Index" });

            routes.MapRoute(
                null,
                "builds",
                new { controller = "Builds", action = "ProjectNamesView" });

            routes.MapRoute(
                null,
                "builds/{projectName}",
                new { controller = "Builds", action = "BuildNamesView" });

            routes.MapRoute(
                null,
                "builds/{projectName}/{buildName}",
                new { controller = "Builds", action = "BuildTimelineView" });

            routes.MapRoute(
                null,
                "api/builds",
                new { controller = "BuildsApi", action = "ProjectNames" });

            routes.MapRoute(
                null,
                "api/builds/{projectName}",
                new { controller = "BuildsApi", action = "BuildNames" });

            routes.MapRoute(
                null,
                "api/builds/{projectName}/{buildName}",
                new { controller = "BuildsApi", action = "BuildTimeline" });
        }
Beispiel #41
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Auth",
                url: "Auth",
                defaults: new { controller = "Auth", action = "AppRedirect" }
                );

            routes.MapRoute(
                name: "ShortUrl",
                url: "{shortUrl}/{controller}/{action}",
                defaults: new { controller = "Home", action = "Index" }
                );

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}",
                defaults: new { controller = "Home", action = "Index" }
                );
        }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "About",
                url: "hakkimizda",
                defaults: new { controller = "About", action = "Index" }
                );

            routes.MapRoute(
                name: "Blog",
                url: "blog",
                defaults: new { controller = "Blog", action = "Index" }
                );

            routes.MapRoute(
                name: "Contact",
                url: "iletisim",
                defaults: new { controller = "Contact", action = "Index" }
                );
            routes.MapRoute(
                name: "Project",
                url: "admin",
                defaults: new { controller = "Admin", action = "Index" }
                );
            routes.MapRoute(
                name: "Admin",
                url: "projeler",
                defaults: new { controller = "Project", action = "Index" }
                );

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );
        }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            //routes.MapRoute(
            //    name: "wiki",
            //    url: "documents/{*path}",
            //    defaults: new { controller = "Documents", action = "GetDocument"}

            //    );


            //routes.MapRoute(
            //    name: "BligByID",
            //    url: "blog/{entryId}",
            //    defaults: new { controller = "Blog", action = "GetEntryById"},
            //    constraints: new { entryId= @"\d+"}
            //    );

            //routes.MapRoute(
            //    name: "BlogByDate",
            //    url: "blog/{entryDate}",
            //    defaults: new { controller = "Blog", action = "GetEntryByDate"}

            //    );

            routes.MapRoute(
                name: "IWantMovies",
                url: "i/want/movies",
                defaults: new { controller = "Movies", action = "Index" }
                );

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );
        }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.MapRoute(null, "", new
            {
                controller = "Product",
                action     = "List",
                category   = (string)null,
                page       = 1
            });
            routes.MapRoute(null, "Page{page}", new
            {
                controller = "Product",
                action     = "List",
                category   = (string)null,
            },
                            new
            {
                page = @"\d+"
            });
            routes.MapRoute(null, "{category}", new
            {
                controller = "Product",
                action     = "List",
                page       = 1
            });

            routes.MapRoute(null, "{category}/Page{page}", new
            {
                controller = "Product",
                action     = "List",
            },
                            new
            {
                page = @"\d+"
            });
            routes.MapRoute(null, "{controller}/{action}");
        }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            /*check following link for more details
             * http://www.hanselman.com/blog/BackToBasicsDynamicImageGenerationASPNETControllersRoutingIHttpHandlersAndRunAllManagedModulesForAllRequests.aspx
             *
             */
            routes.Add(new Route("images/user.Image",
                                 new MyCustomImageRouteHandler()));


            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id1}",
                defaults: new
            {
                controller = "Home",
                action     = "Index",
                id1        = UrlParameter.Optional
            }
                );
        }
Beispiel #46
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            //routes should go from least specific to most specific

            routes.MapMvcAttributeRoutes();

            /*
             * //custom route
             * //name first, then the url, then the defaults, then constraints
             * //There are better ways to do this AVOID THIS WAY (only for older MVC)
             * routes.MapRoute(
             *  "MoviesByReleaseDate",
             *  "movies/released/{year}/{month}",
             *  new { controller = "Movies", action = "ByReleaseDate" },
             *  new { year = @"2015|2016", month=@"/d{2}" });
             */
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );
        }
Beispiel #47
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "accueil",
                url: "{controller}/{action}/{type}",
                defaults: new { controller = "Home", action = "index", type = UrlParameter.Optional }
                );

            routes.MapRoute(
                name: "maconnerie",
                url: "{controller}/{action}/{type}",
                defaults: new { controller = "Calibrage", action = "ValidInfoCalibrage", type = 0 }
                );


            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Calibrage", action = "ValidInfoCalibrage", id = UrlParameter.Optional }
                );
        }
Beispiel #48
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            // Ignore Http handlers
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapMvcAttributeRoutes();

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );

            //routes.RouteExistingFiles = false;
            //routes.AppendTrailingSlash = false;

            /*
             * routes.MapRoute(
             * name: "ICAppUsers",
             * url:  "App/#!/users/{*catch-all}"
             * );
             */
        }
Beispiel #49
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Movies", action = "Index", id = UrlParameter.Optional }
            );

            routes.MapRoute(
         name: "Hello",
         url: "{controller}/{action}/{name}/{id}"
     );

            routes.MapPageRoute("WebFormThing", "Calculator", "~/Default.aspx");

            //            Routes.MapHttpRoute(
            //    name: "DefaultVideo",
            //    routeTemplate: "api/{controller}/{ext}/{filename}"
            //);

        }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
              name: "Manager",
              url: "_SysAdm",
              defaults: new { controller = "Home", action = "Login" }
              ).DataTokens["UseNamespaceFallback"] = false;

            ////網址加入多國語系寫法。
            //routes.MapRoute(
            //   name:"Default_Language",
            //   url:"{language}/{controller}/{action}/{id}",
            //   defaults:new {controller="Home",action="Index",language="",id=UrlParameter.Optional}    
            //);

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
Beispiel #51
0
 public static void RegisterRoutes(RouteCollection routes)
 {
     routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
     routes.MapRoute(
         name: "Posts",
         url: "{controller}/{action}/{id}",
         defaults: new { controller = "Blog", action = "Posts", id = UrlParameter.Optional }
         );
     routes.MapRoute("Category", "Category/{category}",
                     new { controller = "Blog", action = "Category" }
                     );
     routes.MapRoute("Tag", "Tag/{tag}",
                     new { controller = "Blog", action = "Tag" }
                     );
     routes.MapRoute("Post", "Archive/{year}/{month}/{title}",
                     new { controller = "Blog", action = "Post" }
                     );
     routes.MapRoute(
         name: "Default",
         url: "{controller}/{action}/{id}",
         defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
         );
 }
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                "TaskInfo",
                "Task/{action}/{taskId}/{projectId}/{infoId}",
                new { controller = "Task" }
                );

            routes.MapRoute(
                "TaskOther",
                "Task/{action}/{taskId}/{projectId}",
                new { controller = "Task" }
                );

            routes.MapHttpRoute("DefaultApi", "api/{controller}/{id}", new { id = RouteParameter.Optional }
                                );

            routes.MapRoute("Default", "{controller}/{action}/{id}",
                            new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                            );
        }
Beispiel #53
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: null,
                url: "",
                defaults: new { Controller = "Product", action = "List", category = (string)null, page = 1 }
                );

            routes.MapRoute(
                null,
                "Page{page}",
                new { Controller = "Product", action = "List", category = (string)null },
                new { page = @"\d+" }
                );

            routes.MapRoute(
                null,
                "{category}",
                new { Controller = "Product", action = "List", page = 1 }
                );

            routes.MapRoute(
                null,
                "{category}/Page{page}",
                new { Controller = "Product", action = "List", page = 1 },
                new { page = @"\d+" }
                );

            routes.MapRoute(
                name: "",
                url: "{controller}/{action}"
                );

            RegisterServices(new Ninject.StandardKernel());
        }
Beispiel #54
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );

            routes.MapRoute("UserVMs",
                            "UserVMs/UpdateRole/{UserID}/{RoleID}",
                            new { controller = "UserVMs", action = "UpdateRole", UserID = "", RoleID = "" });

            routes.MapRoute("Userprofile",
                            "UserVMs/Userprofile/{sortOrder}",
                            new { controller = "UserVMs", action = "Userprofile", sortOrder = "" });


            routes.MapRoute(
                name: "ManageUseslist",
                url: "{userVMs}/{UserList}/{id}",
                defaults: new { controller = "UserVMs", action = "UserList", id = UrlParameter.Optional }
                );

            routes.MapRoute("AddApartment",
                            "Building/AddApartment/{buildingID}",
                            new { controller = "Building", action = "AddApartment", buildingID = "" });

            routes.MapRoute("ApartmentPfrofile",
                            "Building/ApartmentProfile/{ApartmentID}",
                            new { controller = "Building", action = "ApartmentProfile", ApartmentID = "" });

            routes.MapRoute("getTodayRequests",
                            "{controller}/{action}",
                            new { controller = "DashBoard", action = "getTodayRequests" });
        }
Beispiel #55
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: null,
                url: "Scheduler",
                defaults: new { controller = "Scheduler", action = "Schedule" }
                );

            routes.MapRoute(
                name: null,
                url: "Scheduler/Page={page}/Period={pageSize},Access={access},Type={type}/{name}",
                defaults: new {
                controller = "Scheduler",
                action     = "Schedule",
                name       = UrlParameter.Optional
            }
                );

            routes.MapRoute(
                name: null,
                url: "Scheduler/Page={page}",
                defaults: new {
                controller = "Scheduler",
                action     = "Schedule",
                name       = UrlParameter.Optional
            }
                );


            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );
        }
Beispiel #56
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute("Account", "Account/{action}/{id}", new { controller = "Account", action = "Index", id = UrlParameter.Optional }, new[] { "CMS.Controllers" });

            routes.MapRoute("Cart", "Cart/{action}/{id}", new { controller = "Cart", action = "Index", id = UrlParameter.Optional }, new[] { "CMS.Controllers" });

            routes.MapRoute("Shop", "Shop/{action}/{name}", new { controller = "Shop", action = "Index", name = UrlParameter.Optional }, new[] { "CMS.Controllers" });

            routes.MapRoute("SidebarPartial", "Pages/SidebarPartial", new { controller = "Pages", action = "SidebarPartial" }, new[] { "CMS.Controllers" });

            routes.MapRoute("PagesMenuPartial", "Pages/PagesMenuPartial", new { controller = "Pages", action = "PagesMenuPartial" }, new[] { "CMS.Controllers" });

            routes.MapRoute("Pages", "{page}", new { controller = "Pages", action = "Index" }, new[] { "CMS.Controllers" });

            routes.MapRoute("Default", "", new { controller = "Pages", action = "Index" }, new[] { "CMS.Controllers" });

            //routes.MapRoute(
            //    name: "Default",
            //    url: "{controller}/{action}/{id}",
            //    defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            //);
        }
Beispiel #57
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            //routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            //routes.MapRoute(
            //    name: "Default",
            //    url: "{controller}/{action}/{id}",
            //    defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            //);
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapHttpRoute(
                name: "swagger_root",
                routeTemplate: "",
                defaults: null,
                constraints: null,
                handler: new RedirectHandler((message => message.RequestUri.ToString()), "swagger"));

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
Beispiel #58
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            //routes.IgnoreRoute(".well-known/acme-challenge/{filename}");
            //routes.IgnoreRoute("SenparcWebSocket");

            routes.MapRoute(
                name: "Open",
                url: "Open/Callback/{appId}",
                defaults: new { controller = "Open", action = "Callback", appId = UrlParameter.Optional }
                );

            //routes.MapRoute(
            //  name: "WebSocket",
            //  url: "SenparcWebSocket",
            //  defaults: new { controller = "SenparcWebSocket", action = "SenparcWebSocket" }
            //);

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );
        }
Beispiel #59
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapMvcAttributeRoutes();

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );

            routes.MapRoute(
                name: "ChangeHistoryDIndex",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "ChangeHistory", action = "Index", id = UrlParameter.Optional }
                );

            routes.MapRoute(
                name: "RelatedReports",
                url: "{controller}/{action}/{SPName}",
                defaults: new { controller = "MainConsole", action = "RelatedReports", SPName = UrlParameter.Optional }
                );
        }
Beispiel #60
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                "Default",
                "{controller}/{action}/{id}",
                new { controller = "Blog", action = "Posts", id = UrlParameter.Optional }
            );
            routes.MapRoute(
                "Category",
                "Category/{category}",
                new { controller = "Blog", action = "Category" }
            );
            routes.MapRoute(
                "Tag",
                "Tag/{tag}",
                new { controller = "Blog", action = "Tag" }
            );
            routes.MapRoute(
                "Post",
                "Archive/{year}/{month}/{title}",
                new { controller = "Blog", action = "Post" }
            );
            routes.MapRoute(
                "Login",
                "Login",
                new { controller = "Admin", action = "Login" }
            );
            // default route
            routes.MapRoute(
                "Action",
                "{action}",
                new { controller = "Blog", action = "Posts" }
            );
        }