Skip to main content
erro que aparece ao carregar a página e apetar F12
Fonte Link
WPfan
  • 792
  • 1
  • 12
  • 26

Ao carregar a página e aperta F12 apareceu os seguintes erros:

GET http://localhost:49866/bundles/jquery-3.3.1.js net::ERR_ABORTED
GET http://localhost:49866/bundles/bootstrap.js net::ERR_ABORTED
GET http://localhost:49866/bundles/jquery-3.3.1.js net::ERR_ABORTED
GET http://localhost:49866/bundles/bootstrap.js 404 (Not Found)

Ao carregar a página e aperta F12 apareceu os seguintes erros:

GET http://localhost:49866/bundles/jquery-3.3.1.js net::ERR_ABORTED
GET http://localhost:49866/bundles/bootstrap.js net::ERR_ABORTED
GET http://localhost:49866/bundles/jquery-3.3.1.js net::ERR_ABORTED
GET http://localhost:49866/bundles/bootstrap.js 404 (Not Found)
adicionei os scripts do arquivo cshtml
Fonte Link
WPfan
  • 792
  • 1
  • 12
  • 26

Meu arquivo layout esta assim:

    <!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - Aplicação Teste</title>

    <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")

</head>
<body>
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                @Html.ActionLink("Nome do aplicativo", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">

                    @if (HttpContext.Current.User.IsInRole("Admin"))
                    {
                        <li>@Html.ActionLink("Início", "Index", "Home")</li>
                        <li>@Html.ActionLink("Relatorios", "Relatorios", "Home")</li>
                        <li>@Html.ActionLink("Cadastros", "Cadastros", "Home")</li>
                        <li>@Html.ActionLink("Contato", "Contatos", "Home")</li>
                    }

                    @if (HttpContext.Current.User.IsInRole("Premium"))
                    {
                        <li>@Html.ActionLink("Início", "Index", "Home")</li>
                        <li>@Html.ActionLink("Sobre", "About", "Home")</li>
                        <li>@Html.ActionLink("Contato", "Contatos", "Home")</li>
                    }
                    else
                    {
                        <li>@Html.ActionLink("Sobre", "About", "Home")</li>
                       
                    }

                </ul>
                @Html.Partial("_LoginPartial")
            </div>
        </div>
    </div>
    <div class="container body-content">
        @RenderBody()
        <hr />
        <footer>
            <p>&copy; @DateTime.Now.Year - Projeto Andrêy Ferraz</p>
        </footer>
    </div>
    @Scripts.Render("~/bundles/jquery-3.3.1.js")
    @Scripts.Render("~/bundles/bootstrap.js")
    @RenderSection("scripts", required: false)
</body>
</html>

Meu arquivo layout esta assim:

    <!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - Aplicação Teste</title>

    <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")

</head>
<body>
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                @Html.ActionLink("Nome do aplicativo", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">

                    @if (HttpContext.Current.User.IsInRole("Admin"))
                    {
                        <li>@Html.ActionLink("Início", "Index", "Home")</li>
                        <li>@Html.ActionLink("Relatorios", "Relatorios", "Home")</li>
                        <li>@Html.ActionLink("Cadastros", "Cadastros", "Home")</li>
                        <li>@Html.ActionLink("Contato", "Contatos", "Home")</li>
                    }

                    @if (HttpContext.Current.User.IsInRole("Premium"))
                    {
                        <li>@Html.ActionLink("Início", "Index", "Home")</li>
                        <li>@Html.ActionLink("Sobre", "About", "Home")</li>
                        <li>@Html.ActionLink("Contato", "Contatos", "Home")</li>
                    }
                    else
                    {
                        <li>@Html.ActionLink("Sobre", "About", "Home")</li>
                       
                    }

                </ul>
                @Html.Partial("_LoginPartial")
            </div>
        </div>
    </div>
    <div class="container body-content">
        @RenderBody()
        <hr />
        <footer>
            <p>&copy; @DateTime.Now.Year - Projeto Andrêy Ferraz</p>
        </footer>
    </div>
    @Scripts.Render("~/bundles/jquery-3.3.1.js")
    @Scripts.Render("~/bundles/bootstrap.js")
    @RenderSection("scripts", required: false)
</body>
</html>
Fonte Link
WPfan
  • 792
  • 1
  • 12
  • 26

Meu arquivo _Layout.cshtml não esta sendo reconhecido na aplicação, o que fazer?

Estou fazendo uma aplicação em MVC asp.net, e do nada a minha aplicação não reconhece mais o arquivo de layout não estando mais aplicando o bootstrap e o jquery... Como consigo resolver isso??