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

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


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

 routes.Ignore("{resource}.axd/{*pathInfo}");

in addition you should have this section in web.config

<system.webServer>    <modules runAllManagedModulesForAllRequests="true" /></system.webServer>


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$"/>   <conditions>     <add input="{URL}" pattern="\.axd$" negate="true"/>   </conditions>   <action type="Rewrite" url="/home.aspx"/></rule>


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

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