For reasons too many to mention I cannot currently upgrade our corporate site past 4.7.1.1. I have gotten everything else in the site to work with MVC 4 using assembly redirects etc. However, our Contour forms won't render due to the following error:
Expression of type 'System.Web.Mvc.MvcWebRazorHostFactory' cannot be used for return type 'System.Web.WebPages.Razor.WebRazorHostFactory
System.ArgumentException: Expression of type 'System.Web.Mvc.MvcWebRazorHostFactory' cannot be used for return type 'System.Web.WebPages.Razor.WebRazorHostFactory'
at System.Linq.Expressions.Expression.ValidateLambdaArgs(TypedelegateType, Expression&body, ReadOnlyCollection`1parameters)
at System.Linq.Expressions.Expression.Lambda[TDelegate](Expressionbody, Stringname, BooleantailCall, IEnumerable`1parameters)
at System.Web.WebPages.Razor.WebRazorHostFactory.CreateFactory(StringtypeName)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKeykey, Func`2valueFactory)
at System.Web.WebPages.Razor.WebRazorHostFactory.CreateHostFromConfigCore(RazorWebSectionGroupconfig, StringvirtualPath, StringphysicalPath)
at System.Web.WebPages.Razor.RazorBuildProvider.CreateHost()
at System.Web.WebPages.Razor.RazorBuildProvider.get_Host()
at System.Web.WebPages.Razor.RazorBuildProvider.EnsureGeneratedCode()
at System.Web.WebPages.Razor.RazorBuildProvider.get_CodeCompilerType()
at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProviderbuildProvider)
at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPathvirtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPathvirtualPath, BooleannoBuild, BooleanallowCrossApp, BooleanallowBuildInPrecompile, BooleanthrowIfNotFound, BooleanensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContextcontext, VirtualPathvirtualPath, BooleannoBuild, BooleanallowCrossApp, BooleanallowBuildInPrecompile, BooleanthrowIfNotFound, BooleanensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPathvirtualPath, HttpContextcontext, BooleanallowCrossApp, BooleanthrowIfNotFound)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPathvirtualPath, TyperequiredBaseType, HttpContextcontext, BooleanallowCrossApp)
at System.Web.WebPages.BuildManagerWrapper.CreateInstanceOfType[T](StringvirtualPath)
at System.Web.WebPages.VirtualPathFactoryManager.CreateInstanceOfType[T](StringvirtualPath)
at System.Web.WebPages.WebPageBase.CreateInstanceFromVirtualPath(StringvirtualPath, IVirtualPathFactoryvirtualPathFactory)
at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModelmacro, INodecurrentPage)
at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModelmacro, INodecurrentPage)
Umbraco 4.7.1.1 and MVC 4
For reasons too many to mention I cannot currently upgrade our corporate site past 4.7.1.1. I have gotten everything else in the site to work with MVC 4 using assembly redirects etc. However, our Contour forms won't render due to the following error:
Expression of type 'System.Web.Mvc.MvcWebRazorHostFactory' cannot be used for return type 'System.Web.WebPages.Razor.WebRazorHostFactory
Is there any way I can get around this?
Cheers,
Ed Bishop
Comment author was deleted
Hey Ed,
Could you try the forv4 version found here http://nightly.umbraco.org/Umbraco%20Contour/3.0.20%20WIP/
so full link is
http://nightly.umbraco.org/Umbraco%20Contour/3.0.20%20WIP/UmbracoContour_3.0.20%20WIP_ForV4.zip
Comment author was deleted
ow wait thought this was a new install, what is the current Contour version you are running on the site?
We were using 3.0.18 with the v7 providers removed...
Comment author was deleted
Got a stack trace for the error? That way I can see where it's coming from
Is that enough information?
Ed, did you resolve this?
I have this in a 4.11.10 install with Contour 3.0.6.
Tim, to upgrade to 3.0.20 can we install over the top as there doesn't seem to be an update zip for v4 installs only v6?
Thanks, Simon
I solved this in Umbraco v4.11 by adding some dependent assemblies.
is working on a reply...