
* NpgsqlBlogProvider.cs: PageIndex is now one based * AccountController.cs: Fixes a typo in the registration mail * AdminController.cs: Should fix a 500 at Registration validation * BasketController.cs: WIP * BlogsController.cs: page indexes are now one based * FrontOfficeController.cs: cleanning * GoogleController.cs: code formatting * Global.asax.cs: Default route data to "controller" "action" "id" * BBCodeHelper.cs: Allows not closed "url" BBcodes * InitDb.aspx: StatisPage.master was renamed * packages.config: Google references require System.Web 4.0.0.0 ... removed
63 lines
1.6 KiB
C#
63 lines
1.6 KiB
C#
|
||
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Web;
|
||
using System.Web.Mvc;
|
||
using System.Web.Routing;
|
||
using System.Web.Http;
|
||
using Yavsc.Formatters;
|
||
using Yavsc.Model.FrontOffice;
|
||
|
||
namespace Yavsc
|
||
{
|
||
/// <summary>
|
||
/// Mvc application.
|
||
/// </summary>
|
||
public class MvcApplication : System.Web.HttpApplication
|
||
{
|
||
/// <summary>
|
||
/// Registers the routes.
|
||
/// </summary>
|
||
/// <param name="routes">Routes.</param>
|
||
public static void RegisterRoutes (RouteCollection routes)
|
||
{
|
||
|
||
routes.IgnoreRoute ("{resource}.axd/{*pathInfo}");
|
||
routes.IgnoreRoute ("Scripts/{*pathInfo}");
|
||
routes.IgnoreRoute ("Theme/{*pathInfo}");
|
||
routes.IgnoreRoute ("images/{*pathInfo}");
|
||
routes.IgnoreRoute ("xmldoc/{*pathInfo}"); // xml doc
|
||
routes.IgnoreRoute ("htmldoc/{*pathInfo}"); // html doc
|
||
routes.IgnoreRoute ("favicon.ico");
|
||
routes.IgnoreRoute ("favicon.png");
|
||
routes.IgnoreRoute ("robots.txt");
|
||
routes.MapRoute (
|
||
"Blog",
|
||
"Blog/{user}/{title}",
|
||
new { controller = "Blogs", action = "Index", user=UrlParameter.Optional, title = UrlParameter.Optional }
|
||
);
|
||
routes.MapRoute (
|
||
"Default",
|
||
"{controller}/{action}/{id}",
|
||
new { controller = "Home", action = "Index", id=UrlParameter.Optional}
|
||
);
|
||
}
|
||
/// <summary>
|
||
/// Applications the start.
|
||
/// </summary>
|
||
protected void Application_Start ()
|
||
{
|
||
AreaRegistration.RegisterAllAreas ();
|
||
GlobalConfiguration.Configuration.Routes.MapHttpRoute(
|
||
name: "DefaultApi",
|
||
routeTemplate: "api/{controller}/{action}/{*id}",
|
||
defaults: new { controller = "WorkFlow", action="Index", id=0 }
|
||
);
|
||
|
||
RegisterRoutes (RouteTable.Routes);
|
||
}
|
||
}
|
||
}
|