U4-6619 - Remove MVC dependencies from Umbraco.Core

Created by Michael Farr 13 May 2015, 06:16:02 Updated by Shannon Deminick 13 May 2015, 22:44:24

Please merge the pull request from https://github.com/umbraco/Umbraco-CMS/pull/668

This removes the dependency from Umbraco.Core on the MVC hosting library. This sounds like a generally good idea anyway, but I have included an explanation of my specific scenario in case you want to know more.

This allows my readonly REST API wrapper for Umbraco to be hosted anywhere - including in different versions of MVC and on Mono. I still run the main Umbraco website production build for content editing, but this separate service extracts the data from UmbracoDB directly. This separate service runs in a docker container within ASP.NET 5 (currently vNext) as an ApiController, but I can also run it on windows and on older versions of ASP.NET.

I tried to avoid making any change to the Umbraco code base, as maintaining my own branch is too much effort in the long term. Unfortunately the traditional mechanism to write Umbraco API services just was not possible in my scenario. I also considered a few other options:

network access from my new service to the main umbraco website separate app domain to host the umbraco and its own MVC library. Here are the commit notes: note:MvcHandler.DisableMvcResponseHeader = true was removed from UmbracoApplicationBase.StartApplication. This was the only breaking change, it can be put back in at a higher level if necessary.


Shannon Deminick 13 May 2015, 22:35:56

This is only marked as breaking because the public extension method:

public static FormCollection ToFormCollection(this IDictionary<string, object> d)

Has been moved from Umbraco.Core to Umbraco.Web

Priority: Normal

Type: Feature (request)

State: Fixed


Difficulty: Normal


Backwards Compatible: False

Fix Submitted: Pull request

Affected versions:

Due in version: 7.3.0


Story Points: