New ASP.NET MVC 2 Website with Unity


Create Web Application

 

 

 

Add References

Add a reference to GWN.Contrib.MVC2

 

Derive From Base Classes 

 

Update Global.asax.cs

The GlobalBase will handle the Application_Start() event and then execute the virtual method OnApplication_Start().  All you have to do is make the following to changes to the default Global.asax.cs code-behind file:

Update HomeController.cs

Add the following Silverlight and OnPreControllerRelease methods:

You should be able to compile and run the application - it will generate the following output: