Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ed Bishop 53 posts 203 karma points
    Mar 04, 2014 @ 12:50
    Ed Bishop
    0

    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

    Mar 04, 2014 @ 14:32
  • Comment author was deleted

    Mar 04, 2014 @ 14:33

    ow wait thought this was a new install, what is the current Contour version you are running on the site?

  • Ed Bishop 53 posts 203 karma points
    Mar 04, 2014 @ 15:06
    Ed Bishop
    0

    We were using 3.0.18 with the v7 providers removed...

  • Comment author was deleted

    Mar 04, 2014 @ 15:12

    Got a stack trace for the error? That way I can see where it's coming from

  • Ed Bishop 53 posts 203 karma points
    Mar 04, 2014 @ 16:26
    Ed Bishop
    0
    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(Type delegateType, Expression& body, ReadOnlyCollection`1 parameters)
       at System.Linq.Expressions.Expression.Lambda[TDelegate](Expression body, String name, Boolean tailCall, IEnumerable`1 parameters)
       at System.Web.WebPages.Razor.WebRazorHostFactory.CreateFactory(String typeName)
       at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
       at System.Web.WebPages.Razor.WebRazorHostFactory.CreateHostFromConfigCore(RazorWebSectionGroup config, String virtualPath, String physicalPath)
       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(BuildProvider buildProvider)
       at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
       at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
       at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
       at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
       at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
       at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
       at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
       at System.Web.WebPages.BuildManagerWrapper.CreateInstanceOfType[T](String virtualPath)
       at System.Web.WebPages.VirtualPathFactoryManager.CreateInstanceOfType[T](String virtualPath)
       at System.Web.WebPages.WebPageBase.CreateInstanceFromVirtualPath(String virtualPath, IVirtualPathFactory virtualPathFactory)
       at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage)
       at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)
  • Ed Bishop 53 posts 203 karma points
    Mar 05, 2014 @ 12:16
    Ed Bishop
    0

    Is that enough information?

  • Simon Dingley 1474 posts 3431 karma points c-trib
    Apr 01, 2014 @ 13:10
    Simon Dingley
    0

    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

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Jun 23, 2015 @ 15:55
    Markus Johansson
    0

    I solved this in Umbraco v4.11 by adding some dependent assemblies.

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Jun 23, 2015 @ 15:55
    Markus Johansson
    0
    <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
      </dependentAssembly>
    
Please Sign in or register to post replies

Write your reply to:

Draft