I want know why can not load All Js and Css a folder ?
i have a folder for front views FrontTheme
in this folder there is 2 folders css
and js
and i want load all js and css files in FrontTheme
folder in bundles
my code is :
public class BundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
// bundles.Add(new ScriptBundle("~/Content/Admin/js").IncludeDirectory("~/Content/Admin/assets/", "*.js",true));
// bundles.Add(new StyleBundle("~/Content/Admin/css").IncludeDirectory("~/Content/Admin/assets/", "*.css",true));
bundles.Add(new ScriptBundle("~/Content/FrontTheme/js")
.IncludeDirectory("~/Content/FrontTheme/js", "*.js",true));
bundles.Add(new StyleBundle("~/Content/FrontTheme/css")
.IncludeDirectory("~/Content/FrontTheme/css", "*.css",false));
#if DEBUG
BundleTable.EnableOptimizations = false;
#else
BundleTable.EnableOptimizations = true;
#endif
and in view i use:
@Scripts.Render("~/Content/FrontTheme/js")
@Styles.Render("~/Content/FrontTheme/css")
but bundles not load css and js files and browser get me 403 forbidden status.
---Update--- even i change bundles name to
~/Content/FrontThemejs
~/FrontTheme/js
~/FrontThemejs
~/Frontjs
Frontjs
~/123/js
~/Content/FrontThemecss
~/FrontTheme/css
~/FrontThemecss
~/Frontcss
Frontcss
~/456/css
but status code from 403
change to 404
Failed to load resource: the server responded with a status of 404 (Not Found)