Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

i keep getting "'MsAjaxBundle' is not a valid script name. The name must end in '.js'. " while trying to build my project

when building my website that im helping develop I keep getting the above error and im not sure why, below I will show you the code for my master page as well as the code for the actual page. this error is fairly recently come up and im not really sure why.

    <%@ Master Language="VB" AutoEventWireup="false" CodeBehind="Carers.master.vb" Inherits="FosterTrack.Carers" %>

<!DOCTYPE html> 

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="~/Content/bootstrap.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>



    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"/>


</head>
<body>
<form runat="server">
    <asp:ScriptManager runat="server">
    <Scripts>
        <%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=301884 --%>
        <%--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>



        <a class="navbar-brand" href="#">FosterTrack V2</a>

            <div class="navbar navbar-inverse navbar-fixed-top">
            <nav class="navbar navbar-default" role="navigation">

                <div class="navbar-header">
                    <button  class="navbar-toggle" type="button" data-target=".navbar-collapse" data-toggle="collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                </div>


                <div class="navbar-collapse collapse fullscreen-navbar-collapse">
                    <asp:LoginView ID="HomeLV" runat="server">
                        <RoleGroups>
                            <asp:RoleGroup Roles="Masters, Foster Carers ">
                                <ContentTemplate>
                                    <div id="MainMenu10">
                                        <div class="list-group panel">
                                            <a class="list-group-item list-group-item-success" href="../../../../default.aspx" data-parent="#MainMenu10"> Home  </a>
                                        </div>
                                    </div>
                                </ContentTemplate>
                            </asp:RoleGroup>
                        </RoleGroups>
                    </asp:LoginView>
                    </div>
                </nav>
            </div>





        <div class="container body-content">
            <asp:ContentPlaceHolder ID="MainContent" runat="server">
            </asp:ContentPlaceHolder>
            <hr />
            <footer>
                <p>&copy; <%: DateTime.Now.Year %> - Compass Community Ltd</p>
            </footer>
        </div>
    </form>
</body>
</html> 

Above is the master page below is going to be page level code.

    <%@ Page Title="Home" Language="vb" AutoEventWireup="false" MasterPageFile="~/Carers_Area/Carers.Master" CodeBehind="Carers_Home.aspx.vb" Inherits="FosterTrack.Carers_Home" %>

<%@ Register TagPrefix="UC3" TagName="Drafts" Src="~/Service/Widgets/Carers/Carer_Drafts.ascx" %><asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <br/>   

        <div class="navbar navbar-inverse navbar-fixed-top">
            <nav class="navbar navbar-default" role="navigation">

                <div class="navbar-header">
                    <button  class="navbar-toggle" type="button" data-target=".navbar-collapse" data-toggle="collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                </div>


                <div class="navbar-collapse collapse fullscreen-navbar-collapse">
                    <asp:LoginView ID="HomeLV" runat="server">
                        <RoleGroups>
                            <asp:RoleGroup Roles="Masters, Foster Carers ">
                                <ContentTemplate>
                                    <div id="MainMenu10">
                                        <div class="list-group panel">
                                            <a class="list-group-item list-group-item-success" href="../../../../default.aspx" data-parent="#MainMenu10"> Home  </a>
                                        </div>
                                    </div>
                                </ContentTemplate>
                            </asp:RoleGroup>
                        </RoleGroups>
                    </asp:LoginView>
                    </div>
                </nav>
            </div>

    <h1>Home</h1>







      <asp:WebPartManager ID="WebPartManager1" runat="server">
    </asp:WebPartManager>
    <asp:CatalogZone ID="CatalogZone1" runat="server" CloseVerb-Enabled="False">
        <ZoneTemplate>
            <asp:DeclarativeCatalogPart ID="DeclarativeCatalogPart1" runat="server" Title="Home Page">
                <WebPartsTemplate>
                </WebPartsTemplate>
            </asp:DeclarativeCatalogPart>
        </ZoneTemplate>
        <CloseVerb Enabled="False"></CloseVerb>
        <HeaderCloseVerb Enabled="False" Visible="False" />
    </asp:CatalogZone>


   <div class="col-sm-12">
    <a href="Records/Recordings/New/New_Carer_Recording.aspx">
    <img src="../Images/CreateNewRecording-Button.png" height="75" width="300"/></a>
     <a href="Training/Events_Signup.aspx">
    <img src="../Images/ViewTraining-Button.png" height="75" width="300" /></a>
    </div>



    <asp:Label ID="WarningLbl" runat="server" CssClass="warning" Text=""></asp:Label>
    <div class="col-sm-12">
    <asp:WebPartZone ID="WebPartZonea" runat="server" BorderColor="White" BorderStyle="None"
            BorderWidth="0px" Padding="0" PartChromePadding="" ShowTitleIcons="False" PartChromeType="None">
        <ZoneTemplate>
            <UC3:Drafts ID="Drafts2" runat="server" title=" " />
        </ZoneTemplate>
        <CloseVerb Visible="False" />
        <MinimizeVerb Visible="false" />
    </asp:WebPartZone>
    </div>
    <br />




</asp:Content>
like image 670
Ben Nickless Avatar asked Feb 07 '23 20:02

Ben Nickless


1 Answers

  1. Right-click your project, Manage NuGet Packages, goto "Installed packages", find "Ajax Control Toolkit" and click "Uninstall".

  2. Right-click your project, Manage NuGet Packages, goto "Installed packages", find "Microsoft.AspNet.ScriptManager.MSAjax" and click "Uninstall".

  3. Right-click your project, Manage NuGet Packages, goto "Online", find "Microsoft.AspNet.ScriptManager.MSAjax" and click "Install".
like image 65
Rai Vu Avatar answered May 12 '23 05:05

Rai Vu