To update an MVC project which is using the older routing library from the ITCloud Contrib project:
  1. Ensure that your project has been upgraded to .NET 4.0 and MVC 2 or 3.
  2. Remove reference to the old ITCloud.Web.Mvc.dll assembly
  3. Add reference to the new ITCloud.Web.Routing.dll assembly
  4. Replace all uses of the ITCloud.Web.Mvc namespace to ITCloud.Web.Routing
  5. Replace call to RouteUtility.RegisterUrlRoutesFromAttributes to RouteExtensions.DiscoverMvcControllerRoutes. The new version is an extension method so you would call it directly off the RouteCollection object, e.g., in Globals.asax.cs:

        public static void RegisterRoutes(RouteCollection routes)

            // OLD:
            // RouteUtility.RegisterUrlRoutesFromAttributes(routes);
            // NEW:

Last edited Apr 4, 2011 at 5:55 AM by ds7, version 1


No comments yet.