protected void Application_Start() { var container = new UnityContainer(); ContainerBootstraper.RegisterTypes(container, false); RouteTable.Routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); AreaRegistration.RegisterAllAreas(); AppRoutes.RegisterRoutes(RouteTable.Routes); AntiForgeryConfig.UniqueClaimTypeIdentifier = ClaimTypes.NameIdentifier; }
protected void Application_Start() { var container = new UnityContainer(); ContainerBootstraper.RegisterTypes(container, false); ControllerBuilder.Current.SetControllerFactory(new UnityControllerFactory(container)); RouteTable.Routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); AreaRegistration.RegisterAllAreas(); AppRoutes.RegisterRoutes(RouteTable.Routes); FederatedAuthentication.ServiceConfigurationCreated += OnServiceConfigurationCreated; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { if (env.IsDevelopment()) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); app.UseDeveloperExceptionPage(); app.UseBrowserLink(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseStaticFiles(); app.UseSession(); app.UseMvc(routes => { AppRoutes.RegisterRoutes(routes); }); }