locked
MicrosoftAjax.js and MicrosoftAjaxWebforms 404 errors on Webforms RRS feed

  • Question

  • User1349647816 posted

    I am trying to make a jquery ajax call to one of the functions in my .cs file in webforms but the ajax call doesn't execute and in the dev tools i find 404 errors for MicrosoftAjax.js and MicrosoftAjaxWebForms.js. I have tried re-installing these packages into my solution but I still get those to errors. My solution also didn't have a route config which I added in. How do I resolve the 404 errors on the two ajax files which is why I suspect my ajax calls aren't working.

    Tuesday, August 11, 2020 6:33 AM

All replies

  • User-939850651 posted

    Hi ShatterStar,

    It seems that you can't import js correctly.

    Have you tried adding ScriptManager control to the page:

    <head runat="server">
    <title></title>
    </head>
    <body> <form id="form1" runat="server"> <div> <asp:ScriptManager runat="server"></asp:ScriptManager> </div> </form> </body>

    Result:

    Or you could refer to some of the things done in How to Use CDN for MicrosoftAjax.js with ASP.NET Ajax 4 & Ajax Control Toolkit 40412.

    Hope this can help you.

    Best regards,

    Xudong Peng

    Wednesday, August 12, 2020 3:17 AM
  • User1349647816 posted

    Hi I don't think I have, what would this do?

    Wednesday, August 12, 2020 12:30 PM
  • User-939850651 posted

    Hi ShatterStar,

    Using this control, it will import these two js files into the resource without manually importing them, as shown in my sample code.

    I want to know whether you have modified the BundleConfig.cs file in the App_Start folder?

    On the other hand, what method do you call using jquery ajax, WebMethod or other?

    If possible, please provide more details, mainly include:

    • .NET FrameWork version
    • Related sample code

    Best regards,

    Xudong Peng

    Thursday, August 13, 2020 10:26 AM