Skip to content

Sample MVC Turbine global.asax

darrencauthon edited this page Apr 12, 2011 · 2 revisions

In the average MVC3 application, the global.asax file is one of the most-edited files in the application. Whenever something changes, whether it be routing, model binding, IoC registrations, etc., the developer has to continually open up global.asax to edit the same code.

In the average MVC Turbine application, the global.asax file is one of the least-edited files. Since MVC Turbine opens up your MVC application for extension, there's no need to go back to your global.asax file. Below is the what the average global.asax file looks like in a MVC Turbine application:

using MvcTurbine.ComponentModel;
using MvcTurbine.Unity;
using MvcTurbine.Web;

namespace MvcApplication1
{
    public class MvcApplication : TurbineApplication
    {
        static MvcApplication()
        {
            ServiceLocatorManager.SetLocatorProvider(() => new UnityServiceLocator());
        }
    }
}

Read more at the Getting Started to learn more about setting up a MVC Turbine site.

Clone this wiki locally