locked
Script Manager Error RRS feed

  • Question

  • User1510859543 posted

    We have an asp.net website using net framework 4.5.2 and are getting the following error only on mobile devices on our startup default.aspx page. Note that we have a site.master page that contains a ScriptManager control. The startup page giving this error has a ScriptManagerProxy control.

    The control with ID 'ScriptManagerProxy1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

    If I remove the ScriptManagerProxy control I get the error below.

    A ScriptManager is required on the page to use ASP.NET AJAX Script Components.

    Note that the mobile device gives the error if I use the default browser or Chrome.  If I use a FireFox browser I do not get the error.  Also, I do not get the error on a desktop no matter what condition I use.

    Thursday, September 15, 2016 1:45 PM

All replies

  • User1724605321 posted

    Hi ,

    Have you added the script manager control to your master page or the page that needs it:

    <asp:ScriptManager ID="ScriptManger1" runat="Server">
    </asp:ScriptManager>

    ScriptManager must exist before anything that is using it .

    Best Regards,

    Nan Yu

    Friday, September 16, 2016 6:40 AM
  • User1510859543 posted

    Yes, ScriptManager is on the master page and the content page has ScriptManagerProxy.  I removed the toolkit controls on the page and the proxy and then replaced them and now it is working.  ??

    Friday, September 16, 2016 1:04 PM
  • User1724605321 posted

    Hi ,

    Does you re-add the  toolkit controls then the page now works ?

    Best Regards,

    Nan Yu

    Monday, September 19, 2016 1:19 AM
  • User1510859543 posted

    Yes. Thanks.

    Monday, September 19, 2016 11:42 AM
  • User1510859543 posted

    It is happening again and is frustrating.  If I open the page from a PC it does not throw an error.  If I open from my smartphone using either built in browser or chrome it gives the error "A ScriptManager is required on the page to use ASP.NET AJAX Script Components". It happens on the default.aspx opening page.

    There is a ScriptManager on the master page so the error is bogus.  If I add a ScriptManagerProxy control to the error "The control with ID 'ScriptManagerProxy1'
    requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.
    "

    The page has the AjaxControlToolkit assembly reference at the top that was auto-created when I added the FilteredTextBox control.

    Not really sure what to do.

    Thursday, September 22, 2016 1:06 PM
  • User1724605321 posted

    Hi dlchase ,

    If you not have much pages which requires ScriptManager , how about try to add ScriptManager   in child page , i am not sure why the error is happening sometimes .

    Best Regards,

    Nan Yu

    Friday, September 23, 2016 2:50 AM
  • User1510859543 posted

    Below is in the Master page and it is doing some sort of bundling.

            <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>
    

    Friday, September 23, 2016 12:56 PM
  • User1724605321 posted

    Hi dlchase.

    Please open your developer tools (F12) and make sure you are not getting 404 errors loading script files .

    Best Regards,

    Nan Yu

    Wednesday, September 28, 2016 1:46 AM
  • User-240333334 posted

    Hey <g class="gr_ gr_276 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="276" data-gr-id="276">dlchase</g>,

    This is caused by the Site.Mobile.Master not having <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> in it, even if the Site.Mobile.Master page is not in use. Simply add it and you are good to go.

    Hope this helps!

    Scott

    Wednesday, January 23, 2019 11:06 PM