<?xml version="1.0"?>
<Template Originator="Michael Hutchinson"
          Created="2009/02/20"
          LastModified="2009/02/20">

	<!-- Template Header -->
	<TemplateConfiguration>
		<_Name>ASP.NET Global.asax</_Name>
		<_Category>ASP.NET MVC</_Category>
		<Icon>md-html-file-icon</Icon>
		<LanguageName>C#</LanguageName>
		<ProjectType>AspNetMvc</ProjectType>
		<DefaultFilename IsFixed="True">Global.asax</DefaultFilename>
		<_Description>Creates an ASP.NET MVC Global.asax file.</_Description>
	</TemplateConfiguration>
	
	<Conditions>
		<ParentProject PermittedCreationPaths="" ExcludedFiles="/Global.asax" />
	</Conditions>

	<!-- Template Content -->
	<TemplateFiles>
		<AspNetFile name="Global.asax">
			<FileText>
<![CDATA[<%@ Application Inherits="${Namespace}.MvcApplication" %>]]>
			</FileText>
		</AspNetFile>
		<File name="Global.asax.cs" DependsOn="Global.asax" >
<![CDATA[
﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace ${Namespace}
{
    public class MvcApplication : System.Web.HttpApplication
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

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

        }

        protected void Application_Start()
        {
            RegisterRoutes(RouteTable.Routes);
        }
    }
}]]>
		</File>
	</TemplateFiles>
</Template>
