Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebApplication/MVC2/HeuristicLabWeb.PluginHost/HLWebPluginHost/Global.asax.cs @ 4952

Last change on this file since 4952 was 4604, checked in by dkahn, 14 years ago

#1198 Imported new Plugin Host solution for the new MVC2 based web application

File size: 1.3 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Web;
5using System.Web.Mvc;
6using System.Web.Routing;
7using System.Web.Hosting;
8using HLWebPluginHost.PluginLib;
9using System.Diagnostics;
10
11namespace HLWebPluginHost {
12  // Note: For instructions on enabling IIS6 or IIS7 classic mode,
13  // visit http://go.microsoft.com/?LinkId=9394801
14
15  public class MvcApplication : System.Web.HttpApplication {
16    public static void RegisterRoutes(RouteCollection routes) {
17      routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
18
19      routes.MapRoute(
20          "Default",
21          "{controller}/{action}/{id}",
22          new { controller = "Home", action = "Index", id = UrlParameter.Optional },
23          new string[] { "HLWebPluginHost.Controllers" }  // <------------New string array with namespaces to search
24      );
25
26    }
27
28    protected void Application_Start() {
29      AreaRegistration.RegisterAllAreas();
30
31      // This just tells the framework to use our custom AssemblyResourceProvider when accessing files.
32      HostingEnvironment.RegisterVirtualPathProvider(new AssemblyResourceProvider());
33     
34      // Initializes plugins and views
35      PluginHelper.InitializePluginsAndLoadViewLocations();
36
37      RegisterRoutes(RouteTable.Routes);
38    }
39  }
40}
Note: See TracBrowser for help on using the repository browser.