Copied to clipboard

Flag this post as spam?

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


  • Stefan Arngrimsson 36 posts 59 karma points
    Mar 08, 2011 @ 14:12
    Stefan Arngrimsson
    0

    Razor error

    Hi,

    I get this error:

     

    Error loading Razor Script navRazor.cshtml

    c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\28123bd1\e17eee56\App_Web_navrazor.cshtml.70df5e80.bnyunjig.0.cs(41): error CS0115: 'ASP._Page_macroScripts_navRazor_cshtml.Execute()': no suitable method found to override

     

    Have no idea what's causing this.

    Anyone have an idea?

    Stefan

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Mar 08, 2011 @ 14:16
    Sebastiaan Janssen
    0

    What does the code say on line 41, have you tried setting a breakpoint?

  • Stefan Arngrimsson 36 posts 59 karma points
    Mar 08, 2011 @ 14:19
    Stefan Arngrimsson
    0

    No this is just a basic cshtml file in scripts:

     

    <em>DynamicNode:</em>
    <ul>
        @foreach (var item in @Model.ChildItem.Where("umbracoNaviHide != true"))
        {
        <li><href="@item.Url">@item.Name</a></li>
    }
    </ul>

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Mar 08, 2011 @ 15:25
    Sebastiaan Janssen
    0

    Hmmm, this code gives me no problems, are you using  4.7RC ? 

    There seems to be something wrong with your install if you can't run something simple like this. Do you have razor scripts that do work?

  • Stefan Arngrimsson 36 posts 59 karma points
    Mar 08, 2011 @ 15:53
    Stefan Arngrimsson
    0

    Found it,

     

    Missing the last Razor entries in web.config

     

    thanks,

    Stefan

  • Darshana 1 post 71 karma points
    Oct 02, 2020 @ 06:31
    Darshana
    0

    Missing the last Razor entries in web.config

    Can you please let me know what entry did you added in web.config as I am new to umbraco.

Please Sign in or register to post replies

Write your reply to:

Draft