Wednesday, November 16, 2011

ScriptResource.axd 404

From time to time in different projects you can still get an error when the .NET AJAX framework fails to load it's script files, it can look something like this:

http://mySite.localhost/Page-missing/?404;http://mySite.localhost:80/ScriptResource.axd?d=cX-HxJNNFFwiICal1e9E3Fltyiuue3KJiBAKoFQ2em7CnJSOyiZ3kqEwPAe3s3jFu-pwCNTI4A-GcF4jKuNyshBul05bL4FvWIGJwsE2JnB5FrGfSImgZUrdemyV5ODBNtHvYiUtxb1ZSZunFsb8UDs8Y4Mdu_fdnhJw6VNkv1oIqasV0&t=5c2f384e 404 (Not Found)

Uncaught Error: ASP.NET Ajax client-side framework failed to load.
If you are, then you are probably missing a handler setting in your web.config file
It should look like this in IIS7 (and above)

<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" preCondition="integratedMode" />

The ScriptResource.axd is used by the Microsoft .NET AJAX framework to render helper scripts for it's UpdatePanel controls.