My site does not find the Bootstrap and Jquery files

5

I created a site ASP.NET MVC with Code First and made the first publish of the application, the database and the site were created, the problem is that the site does not find the files css and Jquery of Bootstrap and Scripts folders.

I figured that the first posting of the site already included the transfer of these files css and JavaScript of Bootstrap and the Scripts folder automatically.

I'm looking here in Azure where the root folder is with the compiled files and I can not find it.

BundleConfig.cs file

public static void RegisterBundles(BundleCollection bundles)
    {
        bundles.Add(new ScriptBundle("~/bundles/numeral").Include(
                 "~/Scripts/numeral/numeral.min.js"));

        bundles.Add(new ScriptBundle("~/bundles/moneymask").Include(
                  "~/Scripts/jquery.moneymask.js"));

        bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                    "~/Scripts/jquery-{version}.js",
                    "~/Scripts/jquery.maskedinput.js"));

        bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                    "~/Scripts/jquery.validate*"));

        bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                    "~/Scripts/modernizr-*"));

        bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                  "~/Scripts/bootstrap.js",
                  "~/Scripts/respond.js"));

        bundles.Add(new StyleBundle("~/Content/css").Include(
                  "~/Content/bootstrap.css",
                  "~/Content/site.css",
                  "~/Content/jquery-ui.css",
                  "~/Content/DataTables-1.10.12/media/css/jquery.dataTables.min.css",
                  "~/Content/DataTables-1.10.12/extensions/TableTools/css/dataTables.tableTools.min.css",
                  "~/Content/DataTables/css/jquery.dataTables.min.css"));

        bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
                    "~/Scripts/jquery-ui-{version}.js"));

        bundles.Add(new ScriptBundle("~/bundles/inputmask").Include(
                    "~/Scripts/jquery.inputmask/inputmask.js",
                    "~/Scripts/jquery.inputmask/jquery.inputmask.js",
                    "~/Scripts/jquery.inputmask/inputmask.extensions.js",
                    "~/Scripts/jquery.inputmask/inputmask.date.extensions.js",
                    "~/Scripts/jquery.inputmask/inputmask.numeric.extensions.js"));

        bundles.Add(new ScriptBundle("~/bundles/DataTables").Include(
       "~/Scripts/DataTables-1.10.12/media/js/jquery.dataTables.min.js",
       "~/Scripts/DataTables-1.10.12/media/js/dataTables.bootstrap.min.js",
       "~/Scripts/DataTables-1.10.12/extensions/AutoFill/js/dataTables.autoFill.min.js",
       "~/Scripts/DataTables-1.10.12/extensions/AutoFill/js/autoFill.bootstrap.min.js",
       "~/Content/DataTables-1.10.12/extensions/TableTools/js/dataTables.tableTools.min.js",
       "~/Scripts/DataTables/jquery.dataTables.min.js"));
    }

Error 403 occurs forbiden

ThisistheLayoutfile

Note:It'sinthe

  

\Areas\Administrative\Views\Shared_AdministrativeLayout.cshtml

<!DOCTYPEhtml><html><head><metacharset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - Administração</title>
    @Styles.Render("~/Content/css")

</head>
<body>
    <div class="navbar navbar-default navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
            </div>
            <div class="navbar-collapse collapse">
                <div class="navbar-header"></div>
                @Html.Partial("_MenuPartial")
            </div>
        </div>
    </div>
    <div class="container body-content">
        <div class="panel-heading">
            @RenderBody()
        </div>
        <footer>
            <p>&copy; @DateTime.Now.Year</p>
        </footer>
    </div>
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/jqueryui")
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)
</body>
</html>

For a View that is located for example in:

  

\ Areas \ Administrative \ Views \ Client

I do this:

@{
    ViewBag.Title = "CLIENTE";
    Layout = "~/Areas/Administrativo/Views/Shared/_AdministrativoLayout.cshtml";
}

Running the project works perfectly, but when I deploy the application it does not find the jquery, css and bootstrap files, and as you can see I reference the bundle file like this: @Styles.Render("~/Content/css")

    
asked by anonymous 10.10.2016 / 16:18

1 answer

0

I changed the name of the StyleBundle from: bundles.Add(new StyleBundle("~/Content/css") for bundles.Add(new StyleBundle("~/Content/css/Admin") Thanks @Leonardo Coelho for the suggestions.

    
11.10.2016 / 00:35