
* Profile.aspx: * MyProfile.aspx: * AccountController.cs: renamed the Profile method to "MyProfile", could avoid issue at migrating to MVC5 * favicon.png: favicon now displays a ~"Yavsc" * BlogManager.cs: * BlogsApiController.cs: The authorisation for removing a post is now implemented at Manager's side * BlogsController.cs: Removes this odd call to a static method from the Api controller * CalendarApi.cs: * GoogleController.cs: no more json output for the calls to the Google Api * WorkFlowController.cs: sorted using clauses * Basket.cs: * Commande.cs: * EstimToPdfFormatter.cs: * Brand.cs: adds xml doc * RssFeedsFormatter.cs: modifies xml doc * TexToPdfFormatter.cs: refactoring * Global.asax.cs: Document formatting * BBCodeHelper.cs: encapsulates the url display from the BBCode in starting and closing characters : "<>" * OAuth2.cs: * SimpleJsonPostMethod.cs: using System.Runtime.Serialization.Json instead of Newtonsof.Json * App.master: updating the favicon * RegistrationPending.aspx: fixes the returnUrl usage * AssemblyInfo.aspx: better explanation for this list * Web.config: tried to migrate to MVC5 (using NuGets) * Estim.cs: * ChangePasswordModel.cs: adds xmldoc * BasketController.cs: * BlogProvidersConfigurationSection.cs: cosmetic change * GoogleErrorMessage.cs: - adds xml docs - renders ctor from JsonReaderException obsolete * MvcActionValueBinder.cs: not used * web.config: no more used, gave it up to migrate to MVC5
69 lines
1.9 KiB
C#
69 lines
1.9 KiB
C#
|
||
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Web;
|
||
using System.Web.Mvc;
|
||
using System.Web.Routing;
|
||
using Yavsc.Formatters;
|
||
using Yavsc.Model.FrontOffice;
|
||
using System.Web.Http;
|
||
|
||
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 (
|
||
"Blogs",
|
||
"Blogs/{action}/{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>
|
||
/// Starts the Application.
|
||
/// </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);
|
||
}
|
||
}
|
||
}
|