Thursday, August 26, 2010

SharePoint 2010 AJAX broken

We had an issue where some users running IE7 and IE8 were getting strange errors loading SharePoint pages.  These errors effectively broke the Ajax interface so users were unable to edit list items, design pages, etc.

We received the following errors while loading the page:
Line: 2
Char: 1
Error: Invalid character
Code: 0
URL: http://.../Pages/default.aspx
Line: 2

Char: 1
Error: Invalid character
Code: 0
URL: http://.../Pages/default.aspx
Line: 204

Char: 1
Error: 'Sys' is undefined
Code: 0
URL: http://.../Pages.default.aspx
Line: 974

Char: 1
Error: 'Sys' is undefined
Code: 0
URL: http://.../Pages.default.aspx

Line: 3
Char: 1
Error: 'Type' is undefined
Code: 0
URL: http://.../Pages.default.aspx

Line: 3
Char: 132
Error: Object doesn't support this property or method
Code: 0
URL: http://.../Pages.default.aspx

Additionally, some users were getting the message "'ASP.NET Ajax client-side framework failed to load."

The issue appeared to be with how some workstations where handling the javascript code loaded through ScriptResource.axd.


The solution?

Turning off compression on the script resource handler did the trick.


For IIS7, edit the web.config file associated with the SharePoint site:

Modify the following item in the config file, or add it if it is missing:
<scriptResourceHandler enableCompression="false" enableCaching="true" />

Inside this section:
<system.web.extensions>
      <scripting>

1 comment: