Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 366 Vote(s) - 3.43 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ASP.NET Ajax client-side framework failed to load. when put the ScriptManager on a blank page

#1
I have an error **Microsoft JScript runtime error: ASP.NET Ajax client-side framework failed to load.** on a blank page using masterpage

![enter image description here][1]

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="LoopinWine.WebForm2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">

<div>

</div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnableCdn="True">
</asp:ScriptManager>
</form>
</body>
</html>

This is what it render it the end




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>

</title></head>
<body>
<form method="post" action="WebForm2.aspx" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNjE2OTgwNTY5ZGTfWA/dEX85PXBlbkKsVxeLKyIn+mJQ9piW5cbeNE+qww==" />
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>


<script src="http://ajax.microsoft.com/ajax/4.0/2/WebForms.js" type="text/javascript"></script>


<script src="/ScriptResource.axd?d=6x_aX-LOcgUU-O_K6nM7ST5ViC_naT1e4_j-CY35ASRLpcKYpiapwTARuePHvx3llP-Xhl_AG_ubpM1BzkM5iyn9ThB3m7lmXKvkck0cxTcYiT-VbeKgamKxp9EwxBUyIQN6sSCU9SQm3tMtmzQWRg2&t=ffffffffbad362a4" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
//]]>
</script>

<script src="/ScriptResource.axd?d=khKEuZ4oUqBYvQxJ1ISpPVIW8_AWWc907q5_v74DI2ruWKTJpldq2osxPkAZ__hffe1Q6HTQUyTbL3Q1mD6MX7V65O5ibxKwb4NvN6ycdZ8vEJ-bz51MO-8uoaP2xioK6npm5n8vldI1d0sOCnH6yw2&t=ffffffffbad362a4" type="text/javascript"></script>

<div>

</div>
<script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ScriptManager1', 'form1', [], [], [], 90, '');
//]]>
</script>

</form>
</body>
</html>

The problems might be that i used to have AjaxControlToolkit in my project but later i use jquery instead. so somewhere in the project might try to add Ajaxcontroltoolkit which i can't find it. i don't know how to fix this error. i have tried to add bin file of ajaxcontroltoolkit back but it seems to not work.


[1]:
Reply

#2
Sys undefined means that you're not getting the client side files loaded on your browser.

**Solution 1:**

<add verb="GET"
path="ScriptResource.axd"
type="Microsoft.Web.Handlers.ScriptResourceHandler"
validate="false"/>

**Solution 2:** If you don't have this, add this too under `<assemblies>`

<add assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

**Solution3:** If that doesn't work too, **try deleting files from your "bin" folder and rebuild the solution** and clear the cache of your browser.

**Solution 4:** Add this to your web.config

<location path="ScriptResource.axd">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
Reply

#3
for telerik web resources use this code:

<location path="Telerik.Web.UI.WebResource.axd">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
Reply

#4
Another possible cause is script combining/compression in IE 8 & 9. In web.config at the top level (within Configuration), put

<system.web.extensions>
<scripting>
<scriptResourceHandler enableCompression="false" enableCaching="true" />
</scripting>
</system.web.extensions>

On your ToolKitScriptManager put CombineScripts=False, e.g.

<asp:ToolkitScriptManager runat="server" CombineScripts="False">
</asp:ToolkitScriptManager>

see

[To see links please register here]

which is where I figured out the problem

Reply

#5
this solution works for me:


The error on client was:

SCRIPT5022: ASP.NET Ajax client-side framework failed to load.

SCRIPT5009: 'Sys' is undefined

After many time to mining the websites, and more solutions, i solve the problem:

**the solution for .NET 4.0 is:**

Set EnableCdn property of script manager to true, Like this:

<asp:ScriptManager ID="ScriptManager1" runat="server" EnableCdn="true">



**Next Solution and Better Solution is:**

add this handler to your web.config

<system.webServer>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
</system.webServer>

Reply

#6
In my case the Ajax loading error occurred only if I reloaded the page, not when the page was loaded for the first time.

Looking at the content in the <asp:ScriptManager> tag in Site.Master, I noticed that only some of the <asp:ScriptReference> items had Path attribute set. So, I updated MsAjaxBundle to this: <asp:ScriptReference Name="MsAjaxBundle" Path="~/Scripts/WebForms/MSAjax/MicrosoftAjax.js" /> and the problem went away. I also had to modify the WebFormsBundle the same way and now reloading the page works.
Reply

#7
What worked for me was to download ASP.NET Ajax from [Microsoft][1].

You might also need to explicitly browse for the correct dll version when you add reference e.g.

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Web.Extensions.dll


[1]:

[To see links please register here]

Reply

#8
I set **Application Pool** as **ASP.NET 4.0 Classic** during installation.
Reply

#9
well i just changed RadScriptManger to Simple asp:ScriptManager and it works

**Before:**

<telerik:RadScriptManager ID="RadScriptManager1" EnableCdn="true" runat="server" />

**After**

<asp:ScriptManager ID="scrReg" EnablePartialRendering="true" runat="server"></asp:ScriptManager>

Hope it helps
Reply

#10
Add **EnableScriptCombine="False"** to your RadScriptManager as follows:


`<telerik:RadScriptManager ID="RadScriptManager1" EnableScriptCombine="False" runat="server" />`
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through