Copied to clipboard

Flag this post as spam?

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


  • Christina 127 posts 390 karma points notactivated
    Sep 10, 2019 @ 13:09
    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 13 posts 93 karma points
    Sep 11, 2019 @ 09:05
    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 127 posts 390 karma points notactivated
    Sep 11, 2019 @ 13:50
    Christina
    0

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

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

    /C

  • Christina 127 posts 390 karma points notactivated
    Sep 12, 2019 @ 06:43
    Christina
    0

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

     <add key="Umbraco.Core.ReservedUrls" value="~/bundles/" />
    
  • Daniel Gustafsson 13 posts 93 karma points
    Sep 12, 2019 @ 06:48
    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