Bundling with MVC4 not working after I publish to azure

前端 未结 9 2196
闹比i
闹比i 2021-02-08 14:52

Hi I am trying to bundle my scripts for my application. My debug is working and if I publish with the Web.debug every thing works fine. But when I publish with the Web.releas my

9条回答
  •  一生所求
    2021-02-08 15:32

    As one of the answers mentioned, I have fought this a few hours, my problem was also that I had a folder called scripts, so I changed the name of the script from (this is from my index view)

    @Scripts.Render("~/Scripts/CircleStats") //this is also a folder in my project, which I think is the problem for azure
    

    to

    @Scripts.Render("~/bundles/CircleStats")
    

    And it's working, hopefully this will help someone

    https://forums.asp.net/t/1810635.aspx?403+Access+denied+when+using+Bundling

提交回复
热议问题