Ajax client-side framework failed to load Asp.Net 4.0

I got a complicated problem with ASP.Net 4.0 Ajax....I started a website with Visual Studio 2010 on my machine,and added some update panels they used to work fine,but suddenly i got that series of errors when i run my website

Microsoft JScript runtime error: ASP.NET Ajax client-side framework failed to load.

Microsoft JScript runtime error: 'Sys' is undefined

The strange things is that i made a website on the same machine with VS 2010 and the update panels there work perfectly.i took its web.config to my new website and changed just the connection..and i got the same error

I tried to search for a solution but i failed to find any real solution.Can anyone help?


Here is the answer by zhughes from this thread on asp.net forum.

The Reason : the path of the javascript generated by the scriptmanager changes when the URL Routing module is used.

The Solution : Tell the routing API to not route the files with "axd" extension (the files generated by the scriptmanager)

Add this rule to the method where you register the routing rules in Global.asax


in addition you should have this section in web.config

    <modules runAllManagedModulesForAllRequests="true" />

if you using URL rewrite module, then in each rewrite rule add

<add input="{URL}" pattern="\.axd$" negate="true"/>

under conditions tag, like this:

<rule name="HomeRewrite" stopProcessing="true">
   <match url="^home$"/>
     <add input="{URL}" pattern="\.axd$" negate="true"/>
   <action type="Rewrite" url="/home.aspx"/>

I have found that this is a possibly a caching/compression issue and by putting in the following into Web.Config, resolves the issue.

      <scriptResourceHandler enableCaching="false" enableCompression="false" />

I was having the same problem. I installed VS 2010 SP1 and the problem went away.

I had the same problem and I solved it by run the command aspnet_regiis -i on the folder of the Framework 4.0 (on which my application ran). It was a problem on the Handler Mapping of IIS: this operation fix the problem for me. See also this post.

Hope this could be helpful.

It may be simply missing part in your web.config like the <Handlers> of <httpHandlers>, my advice is if you have old copy of your web config try it out.

Microsoft JScript runtime error: ASP.NET Ajax client-side framework failed to load.

Add reference like this..

<add assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>              
<add assembly="System.Data.Entity, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Services, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Services.Client, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

This is a common error that happens when you try to call framework javascript function before page have even loaded them.

So ether run your code when dom is ready (eg pageload), ether place your code after the scriptmanager tag, or check to place it after the javascript load from scriptmanager.

I had this problem and sought an answer from the almighty Google, tried various suggestions including the ones above but had no luck. Gave up and moved on to other work, came back a few days later and the problem had disappeared.

I resumed work, made some code changes and published my website and the problem reappeared. Went back to the Google and came across someone who had the problem while using the 3.5 framework. In that case s/he was able to resolve the problem by going to the 'Add/Remove Programs' control panel and selecting the repair option.

I did likewise, repairing the 'MS .NET Framework 4 Client Profile' and 'MS .NET Framework 4 Extended'. That fixed the problem for me.

Hope that solves it for someone else.

in my case, it's IISExpress, switch back to the cassini dev server fix my headache.

I had this problem as well dealing with a master page and in my case it was a "Base" meta setting that was messing me up. I do recall reading another article/blog somewhere where they mentioned an issue with ajax validation across different domains causing this type of error.

So in my case, I had a <base...> reference setting the default url for the site but my dev was obviously a different url...thus conflict and the "ASP.NET Ajax client-side framework failed to load." error.

Removed the base and voila...error gone.



  1. If .Net Framework 4.0 client Profile is not available in your machine , so repair .net Frame work 4.0 or re install .
  2. go to Project Property and select target framework 3.5.

In my case it was the UrlScan tool by Microsoft that was rejecting some URL's requested by Ajax. Disabling it solved the problem.

Need Your Help

How to convert a heap dump in android to eclipse format

android eclipse heap-dump mat

Im attempting to analyze a memory leak that has been driving me crazy for weeks, I found out about the eclipse MAT tool that helps you to figure out what is wrong, the problem is every single tutor...

System.Security.Cryptography.CryptographicException: keyset does not exist

c# x509certificate

When I make x509 certificate to encypt and decypt message, I got some error information and could not fix this problem. Could someone ever happend to solve this bug? thanks.