MVC4 style bundle giving 403

后端 未结 3 1705
难免孤独
难免孤独 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:20

    My bundles were registered as paths which corresponded to an actual folder on the solution, e.g. ~/Content/forum.

    This works fine when bundling is turned off (the bundle is included correctly!), but not when bundling is enabled.

    The solution is to change the registered name of the bundle to not be the same as anything that exists in the file system.

提交回复
热议问题