Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 8464 was 8384, checked in by fschoepp, 12 years ago

#1888:

  • Created a project which contains the back-end controller for the Optimization WebSite
  • Added a WCF-back-end-controller which generates all available optimization problems (currently in-memory solution: PlaceholderControllerService.cs)
  • Created a WebRole using ASP.NET MVC 3 for the Optimization Web Site
  • WebSite authenticates users with the HeuristicLab.Authentication membership provider and database
  • WebSite crawls and displays all available optimization scenarios by using the WCF-back-end controller (test with: http://localhost:.../optimization)
File size: 1.2 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.OptimizationScenario), new OptimizationModelBinder());
35    }
36  }
37}
Note: See TracBrowser for help on using the repository browser.