Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
reformat AppHost
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Mar 19, 2014
1 parent 840e89b commit 88d5014
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions src/SocialBootstrapApi/Global.asax.cs
Expand Up @@ -9,32 +9,32 @@

namespace SocialBootstrapApi
{
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
// visit http://go.microsoft.com/?LinkId=9394801
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
// visit http://go.microsoft.com/?LinkId=9394801

public class MvcApplication : System.Web.HttpApplication
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}
public class MvcApplication : System.Web.HttpApplication
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}

public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("Content/{*pathInfo}");
routes.IgnoreRoute("api/{*pathInfo}");
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("Content/{*pathInfo}");
routes.IgnoreRoute("api/{*pathInfo}");
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);

routes.MapRoute("CatchAll", "{*url}",
new { controller = "Home", action = "Index" }
);
}
routes.MapRoute("CatchAll", "{*url}",
new { controller = "Home", action = "Index" }
);
}

protected void Application_Start()
{
Expand All @@ -51,18 +51,18 @@ protected void Application_Start()
new AppHost().Init();
}

protected void Application_BeginRequest(object sender, EventArgs e)
{
Console.WriteLine("Application_BeginRequest");

if (Request.IsLocal)
Profiler.Start();
}
protected void Application_BeginRequest(object sender, EventArgs e)
{
Console.WriteLine("Application_BeginRequest");

protected void Application_EndRequest(object sender, EventArgs e)
{
Console.WriteLine("Application_EndRequest");
Profiler.Stop();
}
}
if (Request.IsLocal)
Profiler.Start();
}

protected void Application_EndRequest(object sender, EventArgs e)
{
Console.WriteLine("Application_EndRequest");
Profiler.Stop();
}
}
}

0 comments on commit 88d5014

Please sign in to comment.