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
routes.Ignore("{resource}.axd/{*pathInfo}");
in addition you should have this section in web.config
<system.webServer> <modules runAllManagedModulesForAllRequests="true" /> </system.webServer>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With