MVC4 style bundle giving 403

后端 未结 3 1712
难免孤独
难免孤独 2020-12-12 18:39

When bundling/minification is enabled, some of my bundles seem to have an invalid URL in the browser (ending with a /), and IIS gives a 403 forbidden error, as if trying to

3条回答
  •  悲&欢浪女
    2020-12-12 19:22

    In my case bundle was specified as a directory @Scripts.Render("~/scripts") so IIS did not know how to serve the actual js file, I changed the bundle name to represent a javascript file @Scripts.Render("~/scripts.js") and that fixed it. The same was true for my style bundle.

提交回复
热议问题