'Msajaxbundle' is not a valid script name. The name must end with.js'

Asked

Viewed 421 times

0

I started a project using framework 4.5 and unfortunately I had to return the version of the framework to 4.0, I changed all the necessary libraries but now that I have returned the version to 4.0 when running it appears the following message "'Msajaxbundle' is not a valid script name. The name should end with '.js'." in the site.master file inserir a descrição da imagem aqui

Although the error is apparently clear, I’m new to programming and I’m not getting it right.

Obs.:When the project was created in version 4.5 of the framework it worked perfectly.

I wonder if anyone could help me.

FOLLOWS THE PAGE CODE

<asp:PlaceHolder runat="server">
    <%: System.Web.Optimization.Scripts.Render("~/bundles/modernizr") %>
</asp:PlaceHolder>
<%--<webopt:bundlereference runat="server" path="~/Content/css" />--%>
<link href="~/Content/css"" rel="stylesheet"/>
<link href="~/Logo.bmp" rel="shortcut icon" type="image/x-icon" />

</head>
<body>
<form runat="server">
    <asp:ScriptManager EnableCdn="true" runat="server" EnableScriptLocalization=True EnableScriptGlobalization=True>
        <Scripts>
            <%--Framework Scripts--%>
            <asp:ScriptReference Name="MsAjaxBundle" />                
            <asp:ScriptReference Name="jquery" />
            <asp:ScriptReference Name="bootstrap" />
            <asp:ScriptReference Name="respond" />
            <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
            <asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
            <asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
            <asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
            <asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
            <asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
            <asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
            <asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
            <asp:ScriptReference Name="WebFormsBundle" />
            <%--Site Scripts--%>
        </Scripts>
    </asp:ScriptManager>

    <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>
                <a class="navbar-brand" runat="server" href="~/">AdCom</a>
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li><a runat="server" href="~/">Inicio</a></li>
                    <li><a runat="server" href="~/About">Sobre</a></li>
                    <li><a runat="server" href="~/Contact">Contato</a></li>
                </ul>
                <asp:LoginView runat="server" ViewStateMode="Disabled">
                    <AnonymousTemplate>
                        <ul class="nav navbar-nav navbar-right">
                            <li><a runat="server" href="~/Account/Login">Login</a></li> <!-- ESSE AQUI -->
                        </ul>
                    </AnonymousTemplate>
                    <LoggedInTemplate>
                        <ul class="nav navbar-nav navbar-right">
                            <li>
                                <asp:LoginStatus runat="server" LogoutAction="Redirect" LogoutText="Log off" LogoutPageUrl="~/" OnLoggingOut="Unnamed_LoggingOut" />
                            </li>
                        </ul>
                    </LoggedInTemplate>
                </asp:LoginView>
            </div>
        </div>
    </div>
    <div class="container body-content">
        <asp:ContentPlaceHolder ID="MainContent" runat="server">
        </asp:ContentPlaceHolder>
        <hr />
        <footer>
            <p>&copy; <%: DateTime.Now.Year %> - Luck Informática</p>
        </footer>
    </div>
</form>

Thanks in advance !

  • Could you please post the code in the question?

  • What is the content within the "~/Bundles/modernizr" ?

  • I posted the page code

  • Take a look https://ajaxcontroltoolkit.codeplex.com/workitem/27444

  • He’s using it for framework 4.5, because I’m using 4.0 I don’t think it would work, or I might be wrong ?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.