yavsc/web/Global.asax.cs
Paul Schneider 0ec856db45 * NoLogin.master:
* StaticPage.master: StaticPage is not the good name for this file

* YavscModel.csproj:
* WebControls.csproj:
* fortune.csproj:
* YavscClient.csproj:
* SalesCatalog.csproj:
* NpgsqlWorkflow.csproj:
* ITContentProvider.csproj:
* NpgsqlMRPProviders.csproj:
* NpgsqlBlogProvider.csproj: .Net framework 4.5.1

* Global.asax.cs: a favicon
ignore route to robots.txt

* App.master: document formatting

* favicon.ico: a favicon
2015-02-04 15:45:21 +01:00

62 lines
1.7 KiB
C#
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.


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}/{user}/{title}",
new { controller = "Blogs", action = "Index", user=UrlParameter.Optional, title = 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);
}
}
}