Copied to clipboard

Flag this post as spam?

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


  • Christina 94 posts 285 karma points notactivated
    1 week ago
    Christina
    0

    Bundles in umbraco 8 return 404

    Hi I have created bundles after this article https://our.umbraco.com/forum/umbraco-8/96341-onapplicationstarted-umbraco-8

    My bundles return 404 but I can browse the files, have I missed something

    I have added in webconfig

    <add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/bundles/" />
    

    and this

       <modules runAllManagedModulesForAllRequests="true">
        <remove name="BundleModule" />
        <add name="BundleModule" type="System.Web.Optimization.BundleModule" />
    </modules>
    

    enter image description here Many thanks! /C

  • Daniel Gustafsson 8 posts 88 karma points
    1 week ago
    Daniel Gustafsson
    0

    Hi,

    When does you get the 404? Is it when you try to render the bundle in a cshtml file? In that case how do you render the scripts in the cshtml?

    //Daniel

  • Christina 94 posts 285 karma points notactivated
    1 week ago
    Christina
    0

    Hi Daniel Thanks for helping me, I render the bundle in master

    @Styles.Render("~/bundles/css")
    @Scripts.Render("~/bundles/js")
    

    /C

  • Christina 94 posts 285 karma points notactivated
    1 week ago
    Christina
    0

    I have solved the issue, added this in web.config

     <add key="Umbraco.Core.ReservedUrls" value="~/bundles/" />
    
  • Daniel Gustafsson 8 posts 88 karma points
    1 week ago
    Daniel Gustafsson
    0

    Strange, i did not have to reserve the url.. Well good thing it works :)

Please Sign in or register to post replies

Write your reply to:

Draft