Files
yavsc/web/Global.asax.cs
Paul Schneider 57a473aff8 Many changes :
* JsonReaderError.aspx: display a nice json conversion error

* CalendarEntryList.cs: new Google data for the calendar entries

* JsonReaderError.cs: Json error model

* README.md: Documentation url

* NpgsqlBlogProvider.cs: Update the blog post title

* BlogsController.cs: - Updating the blog post title
- bug fix rendering the avatar

* FrontOfficeController.cs: - the client cannot modify its estimation

* GoogleController.cs: - implementing the calendar entries retrieval

* HomeController.cs: - the home start page from configuration
  parameter named "StartPage"

* Global.asax.cs: - back to a clean global.asax

* style.css: showing the main area with a background transparent color

* Post.aspx: Bug fix: the message was displayed two times (we keep the
  one from app.master)

* UserPost.aspx: the blog title comes from the poster profile found in
  ViewData

* DateQuery.aspx: implementing the date query

* Web.config: the start page now comes from Web.config

* Web.csproj: the Sql db creation script should not be deployed,
  neither as package.config

* BlogManager.cs: updating the blog post title

* BlogProvider.cs: yavscModel/Blogs/BlogManager.cs


* YavscModel.csproj: new cs files to compile

* App.master: returning from the Google login
2015-01-06 10:15:24 +01:00

55 lines
1.4 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;
namespace Yavsc
{
public class MvcApplication : System.Web.HttpApplication
{
public static void RegisterRoutes (RouteCollection routes)
{
routes.IgnoreRoute ("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute ("Scripts/{*pathInfo}");
routes.IgnoreRoute ("Theme/{*pathInfo}");
routes.IgnoreRoute ("images/{*pathInfo}");
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 }
);*/
routes.MapRoute (
"Default",
"{controller}/{action}/{user}/{title}",
new { controller = "Blogs", action = "Index", user=UrlParameter.Optional, title = UrlParameter.Optional }
);
}
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);
}
}
}