Slow startup with IIS Express

前端 未结 8 984
余生分开走
余生分开走 2020-12-28 13:53

I have a problem with my MVC application and startup.

Every time I make a change and one the app its take a long time to start up.

I have about 100 lines wit

8条回答
  •  死守一世寂寞
    2020-12-28 14:01

    You can control it from the Global.asax file by taking advantage of ViewEngines.Engines.Clear().

    protected void Application_Start()
     {
            ViewEngines.Engines.Clear();
            ViewEngines.Engines.Add(new RazorViewEngine());
            AreaRegistration.RegisterAllAreas();
            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            AuthConfig.RegisterAuth();
      }
    

提交回复
热议问题