Last change
on this file since 4695 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 | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Web;
|
---|
5 | using System.Web.Mvc;
|
---|
6 | using System.Web.Routing;
|
---|
7 | using System.Web.Hosting;
|
---|
8 | using HLWebPluginHost.PluginLib;
|
---|
9 | using System.Diagnostics;
|
---|
10 |
|
---|
11 | namespace 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.