Esempio n. 1
0
        /// <summary>
        /// The application start method.
        /// </summary>
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            TraceConfig.RegisterListener(GlobalConfiguration.Configuration);
            FormatConfig.ConfigureFormats(GlobalConfiguration.Configuration);
            DependencyConfig.ResolveDependencies(GlobalConfiguration.Configuration);
            DocumentationConfig.Configure(GlobalConfiguration.Configuration);

            // Ensure that your Web API is only accessed via HTTPS
            // GlobalConfiguration.Configuration.Filters.Add(new MyEvents.Api.Authentication.OnlyHttpsAttribute());
        }