Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OaaS/HeuristicLab.Services.Optimization.Web/Global.asax.cs @ 9078

Last change on this file since 9078 was 8506, checked in by fschoepp, 12 years ago

#1888:

  • Web project now creates custom html for each type we want to enter / display
  • Added endpointConfigurationName to HiveServiceLocator (because Web Project contains more than one endpoint configuration)
  • Removed logging statement from ConfigurationService to prevent exception during failure of loading ConfigurationSettings
  • ApplicationManager: Changed default implementation to WebApplicationManager (instead of LightWeight) for testing purposes within Web Project
  • WebApplicationManager: The application manager which returns plugin descriptors from the currently loaded assemblies (instead of LightweightAppManager)
  • HiveService: Fixed a transaction bug
  • IControllerService: Created a method to dispatch Scenarios to certain IScenarioManager (in this case HiveScenarioManager)
  • Added more mappable types to ControllerModel
  • PlaceholderControllerService dispatches all Scenarios to the HiveScenarioManager
  • Web project now dispatches the scenario to the controller after pressing "Run Job"
File size: 1.4 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Web;
5using System.Web.Mvc;
6using System.Web.Routing;
7using HeuristicLab.Services.Optimization.Web.Models;
8
9namespace HeuristicLab.Services.Optimization.Web {
10  // Note: For instructions on enabling IIS6 or IIS7 classic mode,
11  // visit http://go.microsoft.com/?LinkId=9394801
12
13  public class MvcApplication : System.Web.HttpApplication {
14    public static void RegisterGlobalFilters(GlobalFilterCollection filters) {
15      filters.Add(new HandleErrorAttribute());
16    }
17
18    public static void RegisterRoutes(RouteCollection routes) {
19      routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
20
21      routes.MapRoute(
22          "Default", // Route name
23          "{controller}/{action}/{id}", // URL with parameters
24          new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
25      );
26
27    }
28
29    protected void Application_Start() {
30      AreaRegistration.RegisterAllAreas();
31
32      RegisterGlobalFilters(GlobalFilters.Filters);
33      RegisterRoutes(RouteTable.Routes);
34      ModelBinders.Binders.Add(typeof(Optimization.ControllerService.Model.InputParameters), new ProblemParametersModelBinder());
35      ModelBinders.Binders.Add(typeof(Optimization.ControllerService.Model.AlgorithmParameters), new AlgorithmParametersModelBinder());
36    }
37  }
38}
Note: See TracBrowser for help on using the repository browser.