Copied to clipboard

Flag this post as spam?

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


  • Nik Wahlberg 639 posts 1237 karma points MVP
    Jul 12, 2011 @ 01:43
    Nik Wahlberg
    0

    Error loading Razor Script

    Hi all,

    I fought valiantly as a member of the XSLT team at CG11 but now I'm too curious to stay away from the all mightly Razor :) However, I am getting the following error when I try to run any MAcro scripts...this one is the 'Navigation' template in the picker when creating a new script (cshtml). 

    Error loading Razor Script Yo.cshtml
    Method not found: 'Void System.Web.WebPages.WebPageBase.ExecutePageHierarchy(System.Web.WebPages.WebPageContext, System.IO.TextWriter)'.

    Thanks for any help. 

    Umbraco 4.7 on .NET 4

    -- Nik

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Jul 12, 2011 @ 13:49
    Nik Wahlberg
    0

    UPDATE: I did try this...

    http://our.umbraco.org/forum/developers/razor/20157-Error-loading-Razor-Script

    But, that doesn't seem to solve the issue :( 

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Jul 12, 2011 @ 13:53
    Sebastiaan Janssen
    0

    Is this an upgrade from v4.6 or lower? You might need to add some web.config values, mainly this one:

      <!-- Added in Umbraco 4.6.2 -->
      <system.web.webPages.razor>
        <host factoryType="umbraco.MacroEngines.RazorUmbracoFactory, umbraco.MacroEngines" />
        <pages pageBaseType="umbraco.MacroEngines.DynamicNodeContext">
          <namespaces>
            <add namespace="Microsoft.Web.Helpers" />
            <add namespace="umbraco" />
            <add namespace="Examine" />
          </namespaces>
        </pages>
      </system.web.webPages.razor>
      <!-- End of added in Umbraco 4.6.2 -->
  • Nik Wahlberg 639 posts 1237 karma points MVP
    Jul 12, 2011 @ 13:54
    Nik Wahlberg
    0

    Hi Sebastiaan, now this is a 4.7 clean install and those are already in the web.config. Am I missing something in my .NET install?

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Jul 12, 2011 @ 13:59
    Sebastiaan Janssen
    0

    Okay, cool then that's not it, do you have both MVC2 and MVC3 installed on this machine?

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Jul 12, 2011 @ 14:21
    Nik Wahlberg
    0

    No, just MVC 3. Do I need both? I'll try that. 

    Thanks!

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Jul 12, 2011 @ 14:31
    Sebastiaan Janssen
    0

    Yeah, I recall that I needed to install 2 and 3 on my server a few months ago, hope that helps.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies